Skip to content

feature/extract-idm-scripts: Support exporting and importing idm scri…#73

Open
skootrivir wants to merge 1 commit into
mainfrom
feature/extract-idm-script-rework
Open

feature/extract-idm-scripts: Support exporting and importing idm scri…#73
skootrivir wants to merge 1 commit into
mainfrom
feature/extract-idm-script-rework

Conversation

@skootrivir
Copy link
Copy Markdown

…pts from global/idm including mappings(sync) and managed objects schema config.

@phalestrivir phalestrivir force-pushed the feature/extract-idm-script-rework branch from a84abfa to 8d63829 Compare March 19, 2026 21:37
Copy link
Copy Markdown

@phalestrivir phalestrivir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went ahead and rebased/cleaned up several of the test files. For the exports that you are using for testing, only include IDM related ones (since we aren't testing journeys, policies, etc.)

Comment thread src/cli/idm/idm-schema-object-export.ts
Comment thread src/cli/mapping/mapping-export.ts
Comment thread src/ops/IdmOps.ts Outdated

const parsed = JSON.parse(fileData);
const allEntities = Object.entries(parsed.idm)
.filter(([id]) => id !== 'meta') // ✅ "meta" 필터링
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this generated by ChatGPT? We don't need the comment there. Also, if you are just trying to filter out the Frodo metadata, it will never be in the idm object, it should look like this if metadata is there (so I don't even think you need to filter it):

{ idm: { ... }, meta: { ... } }

Comment thread src/ops/IdmOps.ts
}

/**
* Import all IDM configuration objects from working directory
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this change, it should stay all caps

Comment thread src/ops/ConfigOps.ts
"endpoint/oauthproxy": {
"_id": "endpoint/oauthproxy",
"context": "endpoint/oauthproxy",
"file": "oauthProxy.js",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of these endpoints are wrong (they shouldn't have a file parameter, just the source parameter)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've talked about this, but this is ForgeOps' default endpoints that don't exist.

"endpoint/mappingDetails": {
"_id": "endpoint/mappingDetails",
"context": "endpoint/mappingDetails",
"file": "mappingDetails.js",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of these endpoints are wrong (they shouldn't have a file parameter, just the source parameter)

"enabled": true,
"from": "",
"html": {
"en": "<html><body><p>Welcome to OpenIDM. Your username is '{{object.userName}}'.</p></body></html>"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should export the HTML and CSS data into separate files like config-manager does

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think instead of naming the directory ".managed.scripts", it should just be called "", since if you are extracting with -x then it's obvious that the directory of the corresponding object name has the scripts inside of it. The way it is currently named, it looks like a file and not a directory.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of the file is taskscan_activate.invokeContext.tasks.script.script.js, I think it should be taskscan_activate.idm.js, since there should only ever be one script associated with a schedule

@phalestrivir phalestrivir force-pushed the feature/extract-idm-script-rework branch from 6904cb3 to b5d8436 Compare May 8, 2026 00:00
@phalestrivir
Copy link
Copy Markdown

phalestrivir commented May 8, 2026

I just rebased and squashed everything. I also made some fixes to the code, include updating -x, --extract to -x, --no-extract. I created a backup branch here from before the changes/rebase: https://github.com/trivir/frodo-cli/tree/backup/extract-idm-script-rework

Tests are still not passing, I didn't get to updating those yet. If nobody gets to it before I'm back from out of town I can get the rest finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants