@contrail/flexplm 1.5.0-alpha.6fc44c4 → 1.5.0-alpha.98b8b06
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli/commands/compile.d.ts +4 -0
- package/lib/cli/commands/compile.js +73 -0
- package/lib/cli/commands/compile.spec.d.ts +1 -0
- package/lib/cli/commands/compile.spec.js +80 -0
- package/lib/cli/commands/create.d.ts +5 -0
- package/lib/cli/commands/create.js +77 -0
- package/lib/cli/commands/create.spec.d.ts +1 -0
- package/lib/cli/commands/create.spec.js +78 -0
- package/lib/cli/commands/upload.d.ts +17 -0
- package/lib/cli/commands/upload.js +228 -0
- package/lib/cli/commands/upload.spec.d.ts +1 -0
- package/lib/cli/commands/upload.spec.js +88 -0
- package/lib/cli/index.d.ts +5 -0
- package/lib/cli/index.js +70 -0
- package/lib/cli/index.spec.d.ts +1 -0
- package/lib/cli/index.spec.js +85 -0
- package/lib/cli/template/mapping-template.ts.template +62 -0
- package/lib/entity-processor/base-entity-processor.d.ts +65 -0
- package/lib/entity-processor/base-entity-processor.js +71 -0
- package/lib/entity-processor/base-entity-processor.spec.js +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/interfaces/mapping-file.d.ts +460 -0
- package/lib/interfaces/mapping-file.js +2 -0
- package/lib/publish/base-process-publish-assortment.d.ts +25 -0
- package/lib/publish/base-process-publish-assortment.js +60 -6
- package/lib/publish/base-process-publish-assortment.spec.js +22 -4
- package/lib/publish/mockData.js +5 -0
- package/lib/transform/identifier-conversion-spec-mockData.js +34 -6
- package/lib/transform/identifier-conversion.d.ts +36 -0
- package/lib/transform/identifier-conversion.js +36 -0
- package/lib/transform/identifier-conversion.spec.js +7 -0
- package/lib/util/config-defaults.js +5 -0
- package/lib/util/config-defaults.spec.js +23 -0
- package/lib/util/data-converter-spec-mockData.js +17 -3
- package/lib/util/data-converter.d.ts +102 -0
- package/lib/util/data-converter.js +194 -33
- package/lib/util/data-converter.spec.js +389 -0
- package/lib/util/error-response-object.d.ts +5 -0
- package/lib/util/error-response-object.js +7 -0
- package/lib/util/event-short-message-status.js +1 -0
- package/lib/util/federation.js +8 -0
- package/lib/util/flexplm-connect.d.ts +7 -0
- package/lib/util/flexplm-connect.js +14 -0
- package/lib/util/logger-config.js +1 -0
- package/lib/util/map-util-spec-mockData.js +17 -3
- package/lib/util/map-utils.d.ts +27 -0
- package/lib/util/map-utils.js +27 -0
- package/lib/util/thumbnail-util.d.ts +21 -0
- package/lib/util/thumbnail-util.js +28 -1
- package/lib/util/thumbnail-util.spec.js +6 -0
- package/lib/util/type-conversion-utils-spec-mockData.js +3 -3
- package/lib/util/type-conversion-utils.d.ts +152 -1
- package/lib/util/type-conversion-utils.js +155 -1
- package/lib/util/type-defaults.d.ts +69 -0
- package/lib/util/type-defaults.js +96 -5
- package/lib/util/type-defaults.spec.js +94 -14
- package/lib/util/type-utils.d.ts +21 -0
- package/lib/util/type-utils.js +23 -0
- package/lib/util/type-utils.spec.js +2 -0
- package/package.json +21 -6
- package/scripts/copy-template.js +10 -0
- package/.github/pull_request_template.md +0 -31
- package/.github/workflows/flexplm-lib.yml +0 -27
- package/.github/workflows/publish-to-npm.yml +0 -121
- package/CHANGELOG.md +0 -42
- package/publish.bat +0 -5
- package/publish.sh +0 -5
- package/src/entity-processor/base-entity-processor.spec.ts +0 -689
- package/src/entity-processor/base-entity-processor.ts +0 -583
- package/src/flexplm-request.ts +0 -28
- package/src/flexplm-utils.spec.ts +0 -27
- package/src/flexplm-utils.ts +0 -29
- package/src/index.ts +0 -22
- package/src/interfaces/interfaces.ts +0 -122
- package/src/interfaces/item-family-changes.ts +0 -67
- package/src/interfaces/publish-change-data.ts +0 -43
- package/src/publish/base-process-publish-assortment-callback.ts +0 -50
- package/src/publish/base-process-publish-assortment.spec.ts +0 -1992
- package/src/publish/base-process-publish-assortment.ts +0 -1134
- package/src/publish/mockData.ts +0 -4561
- package/src/transform/identifier-conversion-spec-mockData.ts +0 -496
- package/src/transform/identifier-conversion.spec.ts +0 -383
- package/src/transform/identifier-conversion.ts +0 -282
- package/src/util/config-defaults.spec.ts +0 -430
- package/src/util/config-defaults.ts +0 -103
- package/src/util/data-converter-spec-mockData.ts +0 -231
- package/src/util/data-converter.spec.ts +0 -1165
- package/src/util/data-converter.ts +0 -766
- package/src/util/error-response-object.spec.ts +0 -116
- package/src/util/error-response-object.ts +0 -50
- package/src/util/event-short-message-status.ts +0 -22
- package/src/util/federation.ts +0 -172
- package/src/util/flexplm-connect.spec.ts +0 -132
- package/src/util/flexplm-connect.ts +0 -208
- package/src/util/logger-config.ts +0 -20
- package/src/util/map-util-spec-mockData.ts +0 -231
- package/src/util/map-utils.spec.ts +0 -103
- package/src/util/map-utils.ts +0 -41
- package/src/util/mockData.ts +0 -101
- package/src/util/thumbnail-util.spec.ts +0 -508
- package/src/util/thumbnail-util.ts +0 -272
- package/src/util/type-conversion-utils-spec-mockData.ts +0 -272
- package/src/util/type-conversion-utils.spec.ts +0 -1031
- package/src/util/type-conversion-utils.ts +0 -490
- package/src/util/type-defaults.spec.ts +0 -708
- package/src/util/type-defaults.ts +0 -284
- package/src/util/type-utils.spec.ts +0 -227
- package/src/util/type-utils.ts +0 -144
- package/tsconfig.json +0 -24
- package/tslint.json +0 -57
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
name: Publish to NPM
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [master]
|
|
6
|
-
paths-ignore:
|
|
7
|
-
- '.github/**'
|
|
8
|
-
pull_request:
|
|
9
|
-
branches: [master]
|
|
10
|
-
paths-ignore:
|
|
11
|
-
- '.github/**'
|
|
12
|
-
|
|
13
|
-
jobs:
|
|
14
|
-
check-version:
|
|
15
|
-
name: Verify version is available on npm
|
|
16
|
-
if: github.event_name == 'pull_request'
|
|
17
|
-
runs-on: ubuntu-latest
|
|
18
|
-
steps:
|
|
19
|
-
- uses: actions/checkout@v4
|
|
20
|
-
|
|
21
|
-
- name: Check version not already published
|
|
22
|
-
run: |
|
|
23
|
-
PACKAGE_NAME=$(node -p "require('./package.json').name")
|
|
24
|
-
VERSION=$(node -p "require('./package.json').version")
|
|
25
|
-
echo "Checking if ${PACKAGE_NAME}@${VERSION} exists on npm..."
|
|
26
|
-
if npm view "${PACKAGE_NAME}@${VERSION}" version 2>/dev/null; then
|
|
27
|
-
echo "::error::Version ${VERSION} is already published on npm. Bump the version in package.json before merging."
|
|
28
|
-
exit 1
|
|
29
|
-
else
|
|
30
|
-
echo "Version ${VERSION} is available."
|
|
31
|
-
fi
|
|
32
|
-
|
|
33
|
-
check-dependencies:
|
|
34
|
-
name: Verify no private dependencies
|
|
35
|
-
runs-on: ubuntu-latest
|
|
36
|
-
steps:
|
|
37
|
-
- uses: actions/checkout@v4
|
|
38
|
-
|
|
39
|
-
- name: Verify no private dependencies
|
|
40
|
-
run: |
|
|
41
|
-
node -e "
|
|
42
|
-
const deps = require('./package.json').dependencies || {};
|
|
43
|
-
const { execSync } = require('child_process');
|
|
44
|
-
let failed = false;
|
|
45
|
-
for (const pkg of Object.keys(deps)) {
|
|
46
|
-
try {
|
|
47
|
-
execSync('npm view ' + pkg, { stdio: 'pipe' });
|
|
48
|
-
} catch {
|
|
49
|
-
console.error('::error::Dependency ' + pkg + ' is not publicly accessible on npm');
|
|
50
|
-
failed = true;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
if (failed) process.exit(1);
|
|
54
|
-
console.log('All ' + Object.keys(deps).length + ' dependencies are public.');
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
publish-alpha:
|
|
58
|
-
name: Publish alpha
|
|
59
|
-
needs: check-dependencies
|
|
60
|
-
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
|
|
61
|
-
runs-on: ubuntu-latest
|
|
62
|
-
permissions:
|
|
63
|
-
id-token: write
|
|
64
|
-
contents: read
|
|
65
|
-
outputs:
|
|
66
|
-
version: ${{ steps.publish.outputs.version }}
|
|
67
|
-
steps:
|
|
68
|
-
- uses: actions/checkout@v4
|
|
69
|
-
|
|
70
|
-
- uses: actions/setup-node@v4
|
|
71
|
-
with:
|
|
72
|
-
node-version: '24'
|
|
73
|
-
registry-url: 'https://registry.npmjs.org'
|
|
74
|
-
|
|
75
|
-
- name: Install and build
|
|
76
|
-
run: npm ci && npm run build
|
|
77
|
-
|
|
78
|
-
- name: Publish alpha
|
|
79
|
-
id: publish
|
|
80
|
-
run: |
|
|
81
|
-
SHORT_SHA=$(echo ${{ github.event.pull_request.head.sha }} | cut -c1-7)
|
|
82
|
-
VERSION=$(node -p "require('./package.json').version")-alpha.${SHORT_SHA}
|
|
83
|
-
npm version $VERSION --no-git-tag-version
|
|
84
|
-
OUTPUT=$(npm publish --tag alpha 2>&1) && {
|
|
85
|
-
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
86
|
-
} || {
|
|
87
|
-
if echo "$OUTPUT" | grep -q "You cannot publish over the previously published versions"; then
|
|
88
|
-
echo "::warning::Alpha ${VERSION} already published, skipping."
|
|
89
|
-
else
|
|
90
|
-
echo "::error::Failed to publish alpha ${VERSION}"
|
|
91
|
-
echo "$OUTPUT"
|
|
92
|
-
exit 1
|
|
93
|
-
fi
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
publish-release:
|
|
97
|
-
name: Publish release
|
|
98
|
-
needs: check-dependencies
|
|
99
|
-
if: github.event_name == 'push'
|
|
100
|
-
runs-on: ubuntu-latest
|
|
101
|
-
permissions:
|
|
102
|
-
id-token: write
|
|
103
|
-
contents: read
|
|
104
|
-
outputs:
|
|
105
|
-
version: ${{ steps.publish.outputs.version }}
|
|
106
|
-
steps:
|
|
107
|
-
- uses: actions/checkout@v4
|
|
108
|
-
|
|
109
|
-
- uses: actions/setup-node@v4
|
|
110
|
-
with:
|
|
111
|
-
node-version: '24'
|
|
112
|
-
registry-url: 'https://registry.npmjs.org'
|
|
113
|
-
|
|
114
|
-
- name: Install and build
|
|
115
|
-
run: npm ci && npm run build
|
|
116
|
-
|
|
117
|
-
- name: Publish release
|
|
118
|
-
id: publish
|
|
119
|
-
run: |
|
|
120
|
-
npm publish
|
|
121
|
-
echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
|
package/CHANGELOG.md
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to `@contrail/flexplm` are documented here.
|
|
4
|
-
|
|
5
|
-
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
6
|
-
Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
-
|
|
8
|
-
## [Unreleased]
|
|
9
|
-
### Added
|
|
10
|
-
- Added support for Inbound `LCSMaterial` to sync to the entity class `item` with type path `item:material` and `itemNumber` as identifier. This is controlled by an `LCSMaterial.processAsItem` (default `false`) config default.
|
|
11
|
-
|
|
12
|
-
## [1.4.0] - 2026-05-06
|
|
13
|
-
### Added
|
|
14
|
-
- Added `getEntityUsingIdentityService` method to `BaseEntityProcessor` for looking up entities via the identity service using a pool key and property criteria. Returns the resolved entity from the identity's `entityReference`, `undefined` if not found, or throws if multiple matches exist.
|
|
15
|
-
|
|
16
|
-
## [1.3.2] - 2026-05-01
|
|
17
|
-
### Added
|
|
18
|
-
- Added syncing Size Range properties; they sync as the raw VibeIQ data. For Example: { "sizes": { "30": ["30","32"], "32": ["30","32"]}, "dimension1": {"slug": "width","label": "Width"}, "dimension2": {"slug": "length", "label": "Length"}}
|
|
19
|
-
|
|
20
|
-
## [1.3.0] - 2026-04-15
|
|
21
|
-
### Added
|
|
22
|
-
- Added inbound thumbnail/primary content syncing from FlexPLM to VibeIQ via `ThumbnailUtil.syncThumbnailToVibeIQ`.
|
|
23
|
-
- Added `syncInboundImages` and `syncOutboundImages` methods to `TypeConversionUtils` for controlling image sync per map file configuration.
|
|
24
|
-
- Added `PRIMARY_CONTENT_UPDATED` status to `EventShortMessageStatus` for when only primary content changes are detected.
|
|
25
|
-
|
|
26
|
-
### Changed
|
|
27
|
-
- `BaseEntityProcessor` update flow now distinguishes between primary-content-only changes and no changes, returning the updated entity when only the thumbnail was synced.
|
|
28
|
-
- Improved `FlexPLMConnect.getRequest` function and added unit tests.
|
|
29
|
-
|
|
30
|
-
## [1.2.1] - 2026-04-08
|
|
31
|
-
|
|
32
|
-
### Added
|
|
33
|
-
- Added EventShortMessageStatus status values for adding items to projects functionality.
|
|
34
|
-
- Added `TypeConversionUtils.isOutboundCreatableFromEntity` method to determine if VibeIQ entities are creatable in FlexPLM (defaults to true).
|
|
35
|
-
|
|
36
|
-
### Changed
|
|
37
|
-
- Added optional `context` parameter to `TypeConversionUtils.isInboundCreatableFromObject` method to allow passing context data to map file `isInboundCreatable` functions.
|
|
38
|
-
|
|
39
|
-
## [1.1.66] - (initial changelog entry)
|
|
40
|
-
|
|
41
|
-
- Initial changelog. Prior releases did not include a changelog.
|
|
42
|
-
See git history for changes predating this entry.
|
package/publish.bat
DELETED