{"id":24185282,"url":"https://github.com/oraopensource/apex-diff","last_synced_at":"2025-09-21T08:31:46.671Z","repository":{"id":36795992,"uuid":"41102800","full_name":"OraOpenSource/apex-diff","owner":"OraOpenSource","description":"APEX Diff","archived":false,"fork":false,"pushed_at":"2020-11-09T13:01:52.000Z","size":33,"stargazers_count":31,"open_issues_count":15,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-04-14T22:19:38.392Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OraOpenSource.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-20T15:15:44.000Z","updated_at":"2021-12-16T20:46:35.000Z","dependencies_parsed_at":"2022-08-29T04:01:21.717Z","dependency_job_id":null,"html_url":"https://github.com/OraOpenSource/apex-diff","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OraOpenSource%2Fapex-diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OraOpenSource%2Fapex-diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OraOpenSource%2Fapex-diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OraOpenSource%2Fapex-diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OraOpenSource","download_url":"https://codeload.github.com/OraOpenSource/apex-diff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233731135,"owners_count":18721286,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-13T11:19:39.195Z","updated_at":"2025-09-21T08:31:41.365Z","avatar_url":"https://github.com/OraOpenSource.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# APEX Diff (Alpha)\nThe purpose of this project is to create a export of an APEX application in JSON format. Having the application export in JSON format will allow for easy diffs on different versions of an application\n\n_This project is still undergoing active development. As such, configuration and command line options may change._\n\n# Pre-requisites\n\n## SQLcl\nThis projects requires that [SQLcl](http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html) (_Oct 13, 2015 or above_) is installed. It is used for its ability to quickly output queries in JSON format and cursor support.\n\nMac users can find additional information on how to install and configre SQLcl [here](http://www.talkapex.com/2015/04/installing-sqlcl.html).\n\nTo find the current version of SQLcl, simply run SQLcl and it will be displayed. Minimum required version is `SQLcl: Release 4.2.0.15.286.1242 RC`.\n\n## Node.js\n[Node.js](https://nodejs.org) version 0.12.x or greater is required. To find your current version run:\n\n```bash\nnode --version\n```\n\n# Running\n\n## Download\nEither download this project from GitHub or clone it using git:\n`git clone https://github.com/OraOpenSource/apex-diff.git`\n\n_Note: This project may eventually be listed on npm for easy install._\n\n## Config\nCreate a new (or copy `config_sample.json`) config file in the `config` folder called `config.json`.\n\n- `debug`: optional, boolean, default `false`.\n  - If `true` will output each step of the process.\n- `rebuildTempFile` : optional, boolean, default `true`.\n  - If `true`, the temp sql file will be re-generated. Unless upgrading APEX, it is not recommended to set this to `true` as it takes additional time to generate the temp sql file.\n- `sqlcl` : optional, string, default `sql`.\n  - Command name (or full path to) SQLcl file.\n- `filters` : optional, array of regular expressions to remove objects from JSON file\n  - The filter will be applied on both the `apex_view_name` and the `apex_view_name.column_name`.\n  - Filters will be applied for all connections.\n  - It is case insensitive.\n  - Any `\\` needs to be escaped with `\\\\` as the regular expression must also be a valid JSON string.\n- `filterGroups` : optional, JSON object, defining set of filterGroups.\n  - Define a set of filters that can then be easily applied to specific connections\n  - Each entry is a name/value pair.\n  - Value is an array of filters that correspond to the filterGroup\n- `connections` : required, JSON object.\n  - Name/value pair for each database connection or connection object\n  - Connection Object: Use this for specific connection information for a connection\n    - `connectionDetails`: required, database connection\n    - `filters`: optional, array of filters (see `filters` above)\n    - `filterGroups`: optional, array of list of `filterGroups` to apply\n\n\nExample:\n```json\n{\n  \"sqlcl\" : \"sqlcl\",\n  \"connections\" : {\n    \"dev\" : {\n      \"connectionDetails\" : \"giffy/giffy@localhost:11521/xe\",\n      \"filters\" : [\"apex_application_pages\"],\n      \"filterGroups\" : [\"updateInfo\"]\n    },\n    \"prod\" : \"oos/oos@prod.oraopensource.com:1521/xe\"\n  },\n  \"filters\" : [\"apex_application_lists\"],\n  \"filterGroups\" : {\n    \"updateInfo\" : [\".+\\\\..+_updated_.*\"]\n  }\n}\n```\n\nExample Explanation:\n\n- `filters`: For all connections data for `apex_application_lists` will be removed.\n- `connections`: They're two connections, `dev` and `prod`,\n  - `dev`:\n    - `filters`: Just for this connection, all entries for `apex_application_pages` will be removed.\n    - `filterGroups`: Any filters defined in the `filterGroup` `updateInfo` will be applied. In this example, all column names that contain `_updated_` will be removed.\n- `filterGroups`: A filterGroup called `updateInfo` has been created and can be applied to individual connections.\n\n### Filter Examples\nThe following list is an example of filters that you can either add to a `filters` option or a `filterGroup`. _Note: the filters are already escaped for JSON use. If testing in a regexp tester ensure to unescape._\n\n_All entries tagged with a `*` are recommended default filters._\n\n | Filter  | Description\n------------- | ------------- | -------------\n* | `^(.(?!page_id$))*_id$` | Exclude all id columns except for `page_id`\n* | `.+\\\\..+_updated_.*` | All columns that contain the name `_updated_`\n* | `.+\\\\.(items|buttons|display_sequence)` | Exclude all columns with ..\n | `apex_application_templates.reference_count` | Self Explanatory\n | `apex_application_auth` | All entries for the `apex_application_auth` view\n\n\n## Run\nThe Node.js application requires two parameters:\n\n- `connection name`: This is the name that is found in the `connections` object in `config.json`.\n- `app_id`: Application ID to generate the JSON for.\n\nUsing the example configuration file above, the following example shows how to call the application:\n\n```bash\n# Can call from any directory that you want f113.json in.\nnode ~/Documents/GitHub/apex-diff/app.js dev 113\n```\n\nThis will generate a prettified JSON file: `f113.json`.\n\n# Developers\nTo help with future development, the following configuration can be added to `config.json`:\n\n- `dev`\n  - `runSql`: `boolean` - If false, will skip over the SQL command. This is useful for testing JSON parsing.\n  - `saveJson`: `boolean` - If false, will not save any changes to the JSON file.\n\nExample:\n```json\n...\n\"dev\" : {\n  \"runSql\" : false,\n  \"saveJson\" : true\n}\n...\n```\n\n# Known Issues\n\n## ORA-00600 Error\nIf you get an `ORA-00600` error, it is a known bug that was fixed in Oracle 12.1.0.1 but re-appeared in 12.1.0.2:\n\n```sql\nORA-00600: internal error code, arguments: [qkeIsExprReferenced1], [], [], [], [], [], [], [], [], [], [], []\n00600. 00000 -  \"internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s]\"\n*Cause:    This is the generic internal error number for Oracle program\n           exceptions. It indicates that a process has encountered a low-level,\n           unexpected condition. The first argument is the internal message\n           number. This argument and the database version number are critical in\n           identifying the root cause and the potential impact to your system.\n```\n\nIf you get it, you my need to add the following to `apex-diff.sql`:\n\n```sql\nalter system set \"_projection_pushdown\" = false scope=memory;\n```\n\n# Support\nIf you're having issues the following are common problems that people have:\n\n- Make sure that your version of Node.js is up to date\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foraopensource%2Fapex-diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foraopensource%2Fapex-diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foraopensource%2Fapex-diff/lists"}