npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

noradle-cm

v0.0.8

Published

noradle app software configuration management for oracle schema object like PL/SQL stored procedure

Downloads

13

Readme

Manage oracle schema object for version control, file format is same as PL/SQL Developer does.

Depend on noradle NDBC and for noradle (or any other PL/SQL based) app CM(configuration management)/VC(version control) purpuse.

install

install package in OS

npm -g install noradle-cm

schema2file in ./bin will be installed into npm global executable path

install support schema into target oracle database

for example, execute in 'noradle-cm' directory

sqlplus "/ as sysdba" @create_user.sql

'create_user.sql' will create 'noradle_cm' schema user, and call install.sql to install support schema objects to the newly create db user.

Get plsql units of a particular oracle schema into a file system directory

So, oracle plsql objects can be export to file system, then use git or any VCS for version-control purpose.

Every exported plsql object's format is the same as "PL/SQL Developer" file save format.

step 1

In schema directory, create a schema.json file, content as below:

{
  "schema" : "message_proxy1",
  "install_script" : {
    "echo" : false,
    "prompt_unit_name" : true
  },
  "use_bom" : true,
  "ignore" : [
    "listen*"
  ]
}

parameter explain

  • schema - export to which oracle schema
  • out_dir - default to current directory ".", specify where the plsql units export to, but install.sql is always in "."
  • install-script - if have, create a install script called install.sql
  • install_script.echo - default false, if set to true, will add set echo on to 'install.sql'
  • install_script.prompt_unit_name - if set to true, will prefix a line that give prompt which plsql unit will install
  • use_bom - if utf8 BOM (0xEFBBBF) will add to plsql unit export file

step 2

In schema directory, execute schema2file port, schema2file will read schema.json, and export schema plsql objects(package, package body, function, procedure) to respective file, optionally add a install.sql script according to schema.json configuration.

example export execution

schema2file 7001

write install.sql done
write gc.spc done
write k_smtp.spc done
...

example export result

cat install.sql

set define off
set echo off


prompt
prompt GC.spc
@@gc.spc

prompt
prompt K_SMTP.spc
@@k_smtp.spc

...

prompt
prompt GC.bdy
@@gc.bdy

prompt
prompt K_SMTP.bdy
@@k_smtp.bdy

...

get change list and make a update sqlplus script

VCS based

example

git diff --stat head~5..head -- . | cut -d "|" -f 1 | grep -v "," | cut -d "/" -f 2

update one db from another db

You may want to sync plsql stored procedures from test db to production db, you don't want all plsql units to "create or replace" on target db, because it's a big job, will spent lot of time, and the target db is continually serving. So you want only plsql units that is changed or different from source db to target db. You know the last time the target db changed a plsql procedure, so noradle-cm can connect to source db to fetch the change-after list, and make a update script called "update-yyyymmdd-yyyymmdd.sql".

schema.json will be reused to configure update script format.

Execute schema_update port YYYYMMDD to make a update script.

example export execution

schema_update 7001 20150121

  no-cm:update_list write update_20150121_20150121.sql done +0ms

example export result

cat update_20150121_20150121.sql

set define off
set echo on


prompt
prompt ADM_EXPORT_SCHEMA_H.spc
@@adm_export_schema_h.spc

prompt
prompt ADM_EXPORT_SCHEMA_H.bdy
@@adm_export_schema_h.bdy