@contrail/flexplm 1.3.0 → 1.3.1-alpha.3e8dbdd

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.
Files changed (149) hide show
  1. package/lib/cli/commands/compile.d.ts +1 -0
  2. package/lib/cli/commands/compile.js +71 -0
  3. package/lib/cli/commands/compile.spec.d.ts +1 -0
  4. package/lib/cli/commands/compile.spec.js +80 -0
  5. package/lib/cli/commands/create.d.ts +1 -0
  6. package/lib/cli/commands/create.js +75 -0
  7. package/lib/cli/commands/create.spec.d.ts +1 -0
  8. package/lib/cli/commands/create.spec.js +78 -0
  9. package/lib/cli/commands/upload.d.ts +10 -0
  10. package/lib/cli/commands/upload.js +226 -0
  11. package/lib/cli/commands/upload.spec.d.ts +1 -0
  12. package/lib/cli/commands/upload.spec.js +88 -0
  13. package/lib/cli/index.d.ts +2 -0
  14. package/lib/cli/index.js +64 -0
  15. package/lib/cli/index.spec.d.ts +1 -0
  16. package/lib/cli/index.spec.js +79 -0
  17. package/lib/cli/template/mapping-template.ts.template +62 -0
  18. package/lib/entity-processor/base-entity-processor.d.ts +89 -42
  19. package/lib/entity-processor/base-entity-processor.js +438 -385
  20. package/lib/entity-processor/base-entity-processor.spec.d.ts +1 -1
  21. package/lib/entity-processor/base-entity-processor.spec.js +398 -397
  22. package/lib/flexplm-request.d.ts +3 -3
  23. package/lib/flexplm-request.js +34 -34
  24. package/lib/flexplm-utils.d.ts +5 -5
  25. package/lib/flexplm-utils.js +33 -33
  26. package/lib/flexplm-utils.spec.d.ts +1 -1
  27. package/lib/flexplm-utils.spec.js +26 -26
  28. package/lib/index.d.ts +23 -22
  29. package/lib/index.js +39 -38
  30. package/lib/interfaces/interfaces.d.ts +105 -105
  31. package/lib/interfaces/interfaces.js +2 -2
  32. package/lib/interfaces/item-family-changes.d.ts +20 -20
  33. package/lib/interfaces/item-family-changes.js +56 -56
  34. package/lib/interfaces/mapping-file.d.ts +460 -0
  35. package/lib/interfaces/mapping-file.js +2 -0
  36. package/lib/interfaces/publish-change-data.d.ts +19 -19
  37. package/lib/interfaces/publish-change-data.js +32 -32
  38. package/lib/publish/base-process-publish-assortment-callback.d.ts +9 -9
  39. package/lib/publish/base-process-publish-assortment-callback.js +38 -38
  40. package/lib/publish/base-process-publish-assortment.d.ts +118 -93
  41. package/lib/publish/base-process-publish-assortment.js +998 -944
  42. package/lib/publish/base-process-publish-assortment.spec.d.ts +1 -1
  43. package/lib/publish/base-process-publish-assortment.spec.js +1688 -1670
  44. package/lib/publish/mockData.d.ts +1389 -1389
  45. package/lib/publish/mockData.js +4524 -4519
  46. package/lib/transform/identifier-conversion-spec-mockData.js +472 -444
  47. package/lib/transform/identifier-conversion.d.ts +51 -15
  48. package/lib/transform/identifier-conversion.js +248 -212
  49. package/lib/transform/identifier-conversion.spec.d.ts +1 -1
  50. package/lib/transform/identifier-conversion.spec.js +343 -339
  51. package/lib/util/config-defaults.d.ts +8 -8
  52. package/lib/util/config-defaults.js +88 -85
  53. package/lib/util/config-defaults.spec.d.ts +1 -1
  54. package/lib/util/config-defaults.spec.js +302 -293
  55. package/lib/util/data-converter-spec-mockData.js +219 -205
  56. package/lib/util/data-converter.d.ts +136 -39
  57. package/lib/util/data-converter.js +718 -592
  58. package/lib/util/data-converter.spec.d.ts +1 -1
  59. package/lib/util/data-converter.spec.js +906 -904
  60. package/lib/util/error-response-object.d.ts +9 -4
  61. package/lib/util/error-response-object.js +54 -47
  62. package/lib/util/error-response-object.spec.d.ts +1 -1
  63. package/lib/util/error-response-object.spec.js +99 -99
  64. package/lib/util/event-short-message-status.d.ts +19 -19
  65. package/lib/util/event-short-message-status.js +24 -23
  66. package/lib/util/federation.d.ts +15 -15
  67. package/lib/util/federation.js +157 -149
  68. package/lib/util/flexplm-connect.d.ts +29 -22
  69. package/lib/util/flexplm-connect.js +190 -176
  70. package/lib/util/flexplm-connect.spec.d.ts +1 -1
  71. package/lib/util/flexplm-connect.spec.js +88 -88
  72. package/lib/util/logger-config.d.ts +1 -1
  73. package/lib/util/logger-config.js +27 -26
  74. package/lib/util/map-util-spec-mockData.js +219 -205
  75. package/lib/util/map-utils.d.ts +33 -6
  76. package/lib/util/map-utils.js +42 -15
  77. package/lib/util/map-utils.spec.d.ts +1 -1
  78. package/lib/util/map-utils.spec.js +89 -89
  79. package/lib/util/mockData.d.ts +80 -80
  80. package/lib/util/mockData.js +103 -103
  81. package/lib/util/thumbnail-util.d.ts +55 -34
  82. package/lib/util/thumbnail-util.js +242 -215
  83. package/lib/util/thumbnail-util.spec.d.ts +1 -1
  84. package/lib/util/thumbnail-util.spec.js +440 -434
  85. package/lib/util/type-conversion-utils-spec-mockData.js +259 -259
  86. package/lib/util/type-conversion-utils.d.ts +163 -23
  87. package/lib/util/type-conversion-utils.js +408 -265
  88. package/lib/util/type-conversion-utils.spec.d.ts +1 -1
  89. package/lib/util/type-conversion-utils.spec.js +868 -868
  90. package/lib/util/type-defaults.d.ts +74 -16
  91. package/lib/util/type-defaults.js +279 -221
  92. package/lib/util/type-defaults.spec.d.ts +1 -1
  93. package/lib/util/type-defaults.spec.js +516 -516
  94. package/lib/util/type-utils.d.ts +34 -13
  95. package/lib/util/type-utils.js +137 -114
  96. package/lib/util/type-utils.spec.d.ts +1 -1
  97. package/lib/util/type-utils.spec.js +192 -190
  98. package/package.json +21 -6
  99. package/scripts/copy-template.js +10 -0
  100. package/.claude/settings.local.json +0 -8
  101. package/.github/pull_request_template.md +0 -31
  102. package/.github/workflows/flexplm-lib.yml +0 -27
  103. package/.github/workflows/publish-to-npm.yml +0 -124
  104. package/CHANGELOG.md +0 -32
  105. package/publish.bat +0 -5
  106. package/publish.sh +0 -5
  107. package/src/entity-processor/base-entity-processor.spec.ts +0 -460
  108. package/src/entity-processor/base-entity-processor.ts +0 -515
  109. package/src/flexplm-request.ts +0 -28
  110. package/src/flexplm-utils.spec.ts +0 -27
  111. package/src/flexplm-utils.ts +0 -29
  112. package/src/index.ts +0 -22
  113. package/src/interfaces/interfaces.ts +0 -122
  114. package/src/interfaces/item-family-changes.ts +0 -67
  115. package/src/interfaces/publish-change-data.ts +0 -43
  116. package/src/publish/base-process-publish-assortment-callback.ts +0 -50
  117. package/src/publish/base-process-publish-assortment.spec.ts +0 -1992
  118. package/src/publish/base-process-publish-assortment.ts +0 -1134
  119. package/src/publish/mockData.ts +0 -4561
  120. package/src/transform/identifier-conversion-spec-mockData.ts +0 -496
  121. package/src/transform/identifier-conversion.spec.ts +0 -354
  122. package/src/transform/identifier-conversion.ts +0 -282
  123. package/src/util/config-defaults.spec.ts +0 -350
  124. package/src/util/config-defaults.ts +0 -93
  125. package/src/util/data-converter-spec-mockData.ts +0 -231
  126. package/src/util/data-converter.spec.ts +0 -1041
  127. package/src/util/data-converter.ts +0 -762
  128. package/src/util/error-response-object.spec.ts +0 -116
  129. package/src/util/error-response-object.ts +0 -50
  130. package/src/util/event-short-message-status.ts +0 -22
  131. package/src/util/federation.ts +0 -172
  132. package/src/util/flexplm-connect.spec.ts +0 -132
  133. package/src/util/flexplm-connect.ts +0 -208
  134. package/src/util/logger-config.ts +0 -20
  135. package/src/util/map-util-spec-mockData.ts +0 -231
  136. package/src/util/map-utils.spec.ts +0 -103
  137. package/src/util/map-utils.ts +0 -41
  138. package/src/util/mockData.ts +0 -101
  139. package/src/util/thumbnail-util.spec.ts +0 -508
  140. package/src/util/thumbnail-util.ts +0 -272
  141. package/src/util/type-conversion-utils-spec-mockData.ts +0 -271
  142. package/src/util/type-conversion-utils.spec.ts +0 -968
  143. package/src/util/type-conversion-utils.ts +0 -460
  144. package/src/util/type-defaults.spec.ts +0 -669
  145. package/src/util/type-defaults.ts +0 -281
  146. package/src/util/type-utils.spec.ts +0 -227
  147. package/src/util/type-utils.ts +0 -144
  148. package/tsconfig.json +0 -29
  149. package/tslint.json +0 -57
@@ -1,190 +1,192 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const type_utils_1 = require("./type-utils");
4
- describe('TypeUtils.getEventObjectClass() tests', () => {
5
- const tu = new type_utils_1.TypeUtils();
6
- it('LCSProduct', () => {
7
- const entityType = 'item';
8
- const newData = {
9
- roles: ['family']
10
- };
11
- const objectClass = tu.getEventObjectClass(entityType, newData);
12
- expect(objectClass).toEqual('LCSProduct');
13
- });
14
- it('LCSSKU', () => {
15
- const entityType = 'item';
16
- const newData = {
17
- roles: ['color']
18
- };
19
- const objectClass = tu.getEventObjectClass(entityType, newData);
20
- expect(objectClass).toEqual('LCSSKU');
21
- });
22
- it('LCSProductSeasonLink', () => {
23
- const entityType = 'project-item';
24
- const newData = {
25
- roles: ['family']
26
- };
27
- const objectClass = tu.getEventObjectClass(entityType, newData);
28
- expect(objectClass).toEqual('LCSProductSeasonLink');
29
- });
30
- it('LCSSKUSeasonLink', () => {
31
- const entityType = 'project-item';
32
- const newData = {
33
- roles: ['color']
34
- };
35
- const objectClass = tu.getEventObjectClass(entityType, newData);
36
- expect(objectClass).toEqual('LCSSKUSeasonLink');
37
- });
38
- it('LCSColor', () => {
39
- const entityType = 'color';
40
- const newData = {};
41
- const objectClass = tu.getEventObjectClass(entityType, newData);
42
- expect(objectClass).toEqual('LCSColor');
43
- });
44
- it('LCSRevisableEntity', () => {
45
- const entityType = 'custom-entity';
46
- const newData = {};
47
- const objectClass = tu.getEventObjectClass(entityType, newData);
48
- expect(objectClass).toEqual('LCSRevisableEntity');
49
- });
50
- });
51
- describe('filterProperties-item', () => {
52
- const itemType = {
53
- typePath: 'item'
54
- };
55
- itemType['typeProperties'] = [
56
- {
57
- id: 'H4NazLloHdUVhc71',
58
- slug: 'null',
59
- propertyLevel: null
60
- },
61
- {
62
- id: 'H4NazLloHdUVhc71',
63
- slug: 'family',
64
- propertyLevel: 'family'
65
- },
66
- {
67
- id: 'H4NazLloHdUVhc71',
68
- slug: 'option',
69
- propertyLevel: 'option'
70
- },
71
- {
72
- id: 'H4NazLloHdUVhc71',
73
- slug: 'overridable',
74
- propertyLevel: 'overridable'
75
- },
76
- {
77
- id: 'H4NazLloHdUVhc71',
78
- slug: 'all',
79
- propertyLevel: 'all'
80
- },
81
- ];
82
- const tu = new type_utils_1.TypeUtils();
83
- it('item-family', () => {
84
- const len = 4;
85
- const newData = {
86
- roles: ['family']
87
- };
88
- const filteredProps = tu.filterTypeProperties(itemType, newData);
89
- expect(filteredProps.length).toEqual(len);
90
- });
91
- it('item-option', () => {
92
- const len = 4;
93
- const newData = {
94
- roles: ['option']
95
- };
96
- const filteredProps = tu.filterTypeProperties(itemType, newData);
97
- expect(filteredProps.length).toEqual(len);
98
- });
99
- it('item-no-roles', () => {
100
- const len = 5;
101
- const newData = {};
102
- const filteredProps = tu.filterTypeProperties(itemType, newData);
103
- expect(filteredProps.length).toEqual(len);
104
- });
105
- });
106
- describe('filterProperties-project-item', () => {
107
- const projectItemType = {
108
- typePath: 'project-item'
109
- };
110
- projectItemType['typeProperties'] = [
111
- {
112
- id: 'H4NazLloHdUVhc71',
113
- slug: 'null',
114
- propertyLevel: null
115
- },
116
- {
117
- id: 'H4NazLloHdUVhc71',
118
- slug: 'family',
119
- propertyLevel: 'family'
120
- },
121
- {
122
- id: 'H4NazLloHdUVhc71',
123
- slug: 'option',
124
- propertyLevel: 'option'
125
- },
126
- {
127
- id: 'H4NazLloHdUVhc71',
128
- slug: 'overridable',
129
- propertyLevel: 'overridable'
130
- },
131
- {
132
- id: 'H4NazLloHdUVhc71',
133
- slug: 'all',
134
- propertyLevel: 'all'
135
- },
136
- ];
137
- const tu = new type_utils_1.TypeUtils();
138
- it('item-family', () => {
139
- const len = 4;
140
- const newData = {
141
- roles: ['family']
142
- };
143
- const filteredProps = tu.filterTypeProperties(projectItemType, newData);
144
- expect(filteredProps.length).toEqual(len);
145
- });
146
- it('item-option', () => {
147
- const len = 4;
148
- const newData = {
149
- roles: ['option']
150
- };
151
- const filteredProps = tu.filterTypeProperties(projectItemType, newData);
152
- expect(filteredProps.length).toEqual(len);
153
- });
154
- });
155
- describe('filterProperties-color', () => {
156
- const colorType = {
157
- typePath: 'color'
158
- };
159
- colorType['typeProperties'] = [
160
- {
161
- id: 'H4NazLloHdUVhc71',
162
- slug: 'null',
163
- },
164
- {
165
- id: 'H4NazLloHdUVhc71',
166
- slug: 'family',
167
- },
168
- {
169
- id: 'H4NazLloHdUVhc71',
170
- slug: 'option',
171
- },
172
- {
173
- id: 'H4NazLloHdUVhc71',
174
- slug: 'overridable',
175
- },
176
- {
177
- id: 'H4NazLloHdUVhc71',
178
- slug: 'all',
179
- },
180
- ];
181
- const tu = new type_utils_1.TypeUtils();
182
- it('color', () => {
183
- const len = 5;
184
- const newData = {
185
- roles: ['family']
186
- };
187
- const filteredProps = tu.filterTypeProperties(colorType, newData);
188
- expect(filteredProps.length).toEqual(len);
189
- });
190
- });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const type_utils_1 = require("./type-utils");
4
+ describe('TypeUtils.getEventObjectClass() tests', () => {
5
+ const tu = new type_utils_1.TypeUtils();
6
+ it('LCSProduct', () => {
7
+ const entityType = 'item';
8
+ const newData = {
9
+ roles: ['family']
10
+ };
11
+ const objectClass = tu.getEventObjectClass(entityType, newData);
12
+ expect(objectClass).toEqual('LCSProduct');
13
+ });
14
+ it('LCSSKU', () => {
15
+ const entityType = 'item';
16
+ const newData = {
17
+ roles: ['color']
18
+ };
19
+ const objectClass = tu.getEventObjectClass(entityType, newData);
20
+ expect(objectClass).toEqual('LCSSKU');
21
+ });
22
+ it('LCSProductSeasonLink', () => {
23
+ const entityType = 'project-item';
24
+ const newData = {
25
+ roles: ['family']
26
+ };
27
+ const objectClass = tu.getEventObjectClass(entityType, newData);
28
+ expect(objectClass).toEqual('LCSProductSeasonLink');
29
+ });
30
+ it('LCSSKUSeasonLink', () => {
31
+ const entityType = 'project-item';
32
+ const newData = {
33
+ roles: ['color']
34
+ };
35
+ const objectClass = tu.getEventObjectClass(entityType, newData);
36
+ expect(objectClass).toEqual('LCSSKUSeasonLink');
37
+ });
38
+ it('LCSColor', () => {
39
+ const entityType = 'color';
40
+ const newData = {};
41
+ const objectClass = tu.getEventObjectClass(entityType, newData);
42
+ expect(objectClass).toEqual('LCSColor');
43
+ });
44
+ it('LCSRevisableEntity', () => {
45
+ const entityType = 'custom-entity';
46
+ const newData = {};
47
+ const objectClass = tu.getEventObjectClass(entityType, newData);
48
+ expect(objectClass).toEqual('LCSRevisableEntity');
49
+ });
50
+ });
51
+ describe('filterProperties-item', () => {
52
+ const itemType = {
53
+ typePath: 'item'
54
+ };
55
+ itemType['typeProperties'] = [
56
+ {
57
+ id: 'H4NazLloHdUVhc71',
58
+ slug: 'null',
59
+ propertyLevel: null
60
+ },
61
+ {
62
+ id: 'H4NazLloHdUVhc71',
63
+ slug: 'family',
64
+ propertyLevel: 'family'
65
+ },
66
+ {
67
+ id: 'H4NazLloHdUVhc71',
68
+ slug: 'option',
69
+ propertyLevel: 'option'
70
+ },
71
+ {
72
+ id: 'H4NazLloHdUVhc71',
73
+ slug: 'overridable',
74
+ propertyLevel: 'overridable'
75
+ },
76
+ {
77
+ id: 'H4NazLloHdUVhc71',
78
+ slug: 'all',
79
+ propertyLevel: 'all'
80
+ },
81
+ ];
82
+ const tu = new type_utils_1.TypeUtils();
83
+ it('item-family', () => {
84
+ const len = 4;
85
+ const newData = {
86
+ roles: ['family']
87
+ };
88
+ const filteredProps = tu.filterTypeProperties(itemType, newData);
89
+ expect(filteredProps.length).toEqual(len);
90
+ });
91
+ it('item-option', () => {
92
+ const len = 4;
93
+ const newData = {
94
+ roles: ['option']
95
+ };
96
+ const filteredProps = tu.filterTypeProperties(itemType, newData);
97
+ expect(filteredProps.length).toEqual(len);
98
+ });
99
+ it('item-no-roles', () => {
100
+ const len = 5;
101
+ const newData = {};
102
+ const filteredProps = tu.filterTypeProperties(itemType, newData);
103
+ expect(filteredProps.length).toEqual(len);
104
+ });
105
+ });
106
+ //project-item
107
+ describe('filterProperties-project-item', () => {
108
+ const projectItemType = {
109
+ typePath: 'project-item'
110
+ };
111
+ projectItemType['typeProperties'] = [
112
+ {
113
+ id: 'H4NazLloHdUVhc71',
114
+ slug: 'null',
115
+ propertyLevel: null
116
+ },
117
+ {
118
+ id: 'H4NazLloHdUVhc71',
119
+ slug: 'family',
120
+ propertyLevel: 'family'
121
+ },
122
+ {
123
+ id: 'H4NazLloHdUVhc71',
124
+ slug: 'option',
125
+ propertyLevel: 'option'
126
+ },
127
+ {
128
+ id: 'H4NazLloHdUVhc71',
129
+ slug: 'overridable',
130
+ propertyLevel: 'overridable'
131
+ },
132
+ {
133
+ id: 'H4NazLloHdUVhc71',
134
+ slug: 'all',
135
+ propertyLevel: 'all'
136
+ },
137
+ ];
138
+ const tu = new type_utils_1.TypeUtils();
139
+ it('item-family', () => {
140
+ const len = 4;
141
+ const newData = {
142
+ roles: ['family']
143
+ };
144
+ const filteredProps = tu.filterTypeProperties(projectItemType, newData);
145
+ expect(filteredProps.length).toEqual(len);
146
+ });
147
+ it('item-option', () => {
148
+ const len = 4;
149
+ const newData = {
150
+ roles: ['option']
151
+ };
152
+ const filteredProps = tu.filterTypeProperties(projectItemType, newData);
153
+ expect(filteredProps.length).toEqual(len);
154
+ });
155
+ });
156
+ //color
157
+ describe('filterProperties-color', () => {
158
+ const colorType = {
159
+ typePath: 'color'
160
+ };
161
+ colorType['typeProperties'] = [
162
+ {
163
+ id: 'H4NazLloHdUVhc71',
164
+ slug: 'null',
165
+ },
166
+ {
167
+ id: 'H4NazLloHdUVhc71',
168
+ slug: 'family',
169
+ },
170
+ {
171
+ id: 'H4NazLloHdUVhc71',
172
+ slug: 'option',
173
+ },
174
+ {
175
+ id: 'H4NazLloHdUVhc71',
176
+ slug: 'overridable',
177
+ },
178
+ {
179
+ id: 'H4NazLloHdUVhc71',
180
+ slug: 'all',
181
+ },
182
+ ];
183
+ const tu = new type_utils_1.TypeUtils();
184
+ it('color', () => {
185
+ const len = 5;
186
+ const newData = {
187
+ roles: ['family']
188
+ };
189
+ const filteredProps = tu.filterTypeProperties(colorType, newData);
190
+ expect(filteredProps.length).toEqual(len);
191
+ });
192
+ });
package/package.json CHANGED
@@ -1,11 +1,18 @@
1
1
  {
2
2
  "name": "@contrail/flexplm",
3
- "version": "1.3.0",
3
+ "version": "1.3.1-alpha.3e8dbdd",
4
4
  "description": "Library used for integration with flexplm.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
7
+ "bin": {
8
+ "flexplm-mapping": "lib/cli/index.js"
9
+ },
10
+ "files": [
11
+ "lib/**/*",
12
+ "scripts/copy-template.js"
13
+ ],
7
14
  "scripts": {
8
- "build": "tsc",
15
+ "build": "tsc && node scripts/copy-template.js",
9
16
  "format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
10
17
  "lint": "tslint -p tsconfig.json",
11
18
  "test": "jest",
@@ -25,6 +32,14 @@
25
32
  "tslint-config-prettier": "^1.18.0",
26
33
  "typescript": "^4.0.0"
27
34
  },
35
+ "peerDependencies": {
36
+ "typescript": ">=4.0.0"
37
+ },
38
+ "peerDependenciesMeta": {
39
+ "typescript": {
40
+ "optional": true
41
+ }
42
+ },
28
43
  "jest": {
29
44
  "moduleFileExtensions": [
30
45
  "js",
@@ -40,10 +55,10 @@
40
55
  "testEnvironment": "node"
41
56
  },
42
57
  "dependencies": {
43
- "@contrail/app-framework": "^1.3.4",
44
- "@contrail/sdk": "^1.4.3",
45
- "@contrail/transform-data": "^1.1.3",
46
- "@contrail/util": "^1.0.48",
58
+ "@contrail/app-framework": "^1.4.3",
59
+ "@contrail/sdk": "^1.5.10",
60
+ "@contrail/transform-data": "^1.3.2-alpha.36321eb",
61
+ "@contrail/util": "^1.3.1",
47
62
  "axios": "^1.4.0",
48
63
  "p-limit": "^3.1.0"
49
64
  }
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+ const fs = require('fs');
3
+ const path = require('path');
4
+
5
+ const SRC = path.join('src', 'cli', 'template', 'mapping-template.ts.template');
6
+ const DST = path.join('lib', 'cli', 'template', 'mapping-template.ts.template');
7
+
8
+ fs.mkdirSync(path.dirname(DST), { recursive: true });
9
+ fs.copyFileSync(SRC, DST);
10
+ console.log(`Copied ${SRC} -> ${DST}`);
@@ -1,8 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(npx jest:*)",
5
- "Bash(npx tsc:*)"
6
- ]
7
- }
8
- }
@@ -1,31 +0,0 @@
1
- ## What
2
- - [ ] Bugfix
3
- - [ ] Feature
4
- - [ ] Enhancement
5
-
6
- Description:
7
- <!--
8
- Describe the functional changes of the PR.
9
-
10
- If the mechanism of your change are complex, describe them in detail as you
11
- would if you were explaining them to a team mate.
12
-
13
- If the PR is simple, there is no need to repeat yourself. A small description
14
- is sufficient.
15
- -->
16
-
17
- ## Why
18
- <!--
19
- why is this change needed? Same rules as with #What
20
- -->
21
-
22
-
23
- ## Testing added
24
- <!--
25
- Describe the testing you added to this PR
26
- -->
27
-
28
-
29
- ## Link to Jira ticket(s)
30
- https://vibe-team.atlassian.net/browse/VIBE-TICKET_NUMBER_HERE
31
-
@@ -1,27 +0,0 @@
1
- name: flexplm-lib-tests
2
- on:
3
- pull_request:
4
- workflow_dispatch: # allow running in github actions manually
5
- jobs:
6
- test:
7
- runs-on: ubuntu-24.04
8
- strategy:
9
- matrix:
10
- node-version: [22.14.0]
11
- steps:
12
- - name: Node.js
13
- uses: actions/setup-node@v3
14
- with:
15
- node-version: ${{ matrix.node-version }}
16
-
17
- - uses: actions/checkout@v3
18
-
19
- - name: NPM Install
20
- env:
21
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
22
- run: npm ci
23
-
24
- - name: Unit Tests -
25
- env:
26
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
27
- run: npm test
@@ -1,124 +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
- publish-alpha:
34
- name: Publish alpha
35
- if: github.event_name == 'pull_request'
36
- runs-on: ubuntu-latest
37
- outputs:
38
- version: ${{ steps.publish.outputs.version }}
39
- steps:
40
- - uses: actions/checkout@v4
41
-
42
- - uses: actions/setup-node@v4
43
- with:
44
- node-version: '20'
45
- registry-url: 'https://registry.npmjs.org'
46
-
47
- - name: Install and build
48
- env:
49
- NPM_TOKEN: ${{ secrets.ZACH_NPM_TOKEN_4 }}
50
- NODE_AUTH_TOKEN: ${{ secrets.ZACH_NPM_TOKEN_4 }}
51
- run: npm ci && npm run build
52
-
53
- - name: Publish alpha
54
- id: publish
55
- run: |
56
- SHORT_SHA=$(echo ${{ github.event.pull_request.head.sha }} | cut -c1-7)
57
- VERSION=$(node -p "require('./package.json').version")-alpha.${SHORT_SHA}
58
- npm version $VERSION --no-git-tag-version
59
- OUTPUT=$(npm publish --tag alpha 2>&1) && {
60
- echo "version=$VERSION" >> $GITHUB_OUTPUT
61
- } || {
62
- if echo "$OUTPUT" | grep -q "You cannot publish over the previously published versions"; then
63
- echo "::warning::Alpha ${VERSION} already published, skipping."
64
- else
65
- echo "::error::Failed to publish alpha ${VERSION}"
66
- echo "$OUTPUT"
67
- exit 1
68
- fi
69
- }
70
- env:
71
- NPM_TOKEN: ${{ secrets.ZACH_NPM_TOKEN_4 }}
72
- NODE_AUTH_TOKEN: ${{ secrets.ZACH_NPM_TOKEN_4 }}
73
-
74
- publish-release:
75
- name: Publish release
76
- if: github.event_name == 'push'
77
- runs-on: ubuntu-latest
78
- outputs:
79
- version: ${{ steps.publish.outputs.version }}
80
- steps:
81
- - uses: actions/checkout@v4
82
-
83
- - uses: actions/setup-node@v4
84
- with:
85
- node-version: '20'
86
- registry-url: 'https://registry.npmjs.org'
87
-
88
- - name: Install and build
89
- env:
90
- NPM_TOKEN: ${{ secrets.ZACH_NPM_TOKEN_4 }}
91
- NODE_AUTH_TOKEN: ${{ secrets.ZACH_NPM_TOKEN_4 }}
92
- run: npm ci && npm run build
93
-
94
- - name: Publish release
95
- id: publish
96
- run: |
97
- npm publish
98
- echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
99
- env:
100
- NPM_TOKEN: ${{ secrets.ZACH_NPM_TOKEN_4 }}
101
- NODE_AUTH_TOKEN: ${{ secrets.ZACH_NPM_TOKEN_4 }}
102
-
103
- verify-install:
104
- name: Verify public install
105
- needs: [publish-alpha, publish-release]
106
- if: always() && (needs.publish-alpha.outputs.version || needs.publish-release.outputs.version)
107
- runs-on: ubuntu-latest
108
- steps:
109
- - name: Install without auth
110
- run: |
111
- VERSION="${{ needs.publish-alpha.outputs.version || needs.publish-release.outputs.version }}"
112
- echo "Verifying @contrail/flexplm@${VERSION} can be installed without auth..."
113
- mkdir /tmp/install-test && cd /tmp/install-test
114
- npm init -y > /dev/null
115
- for attempt in 1 2 3; do
116
- if npm install @contrail/flexplm@${VERSION} --no-save 2>/dev/null; then
117
- echo "Install verified successfully."
118
- exit 0
119
- fi
120
- echo "Attempt ${attempt} failed, waiting 10s for registry propagation..."
121
- sleep 10
122
- done
123
- echo "::error::Failed to install @contrail/flexplm@${VERSION} after 3 attempts"
124
- exit 1
package/CHANGELOG.md DELETED
@@ -1,32 +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
-
10
- ## [1.3.0] - 2026-04-15
11
- ### Added
12
- - Added inbound thumbnail/primary content syncing from FlexPLM to VibeIQ via `ThumbnailUtil.syncThumbnailToVibeIQ`.
13
- - Added `syncInboundImages` and `syncOutboundImages` methods to `TypeConversionUtils` for controlling image sync per map file configuration.
14
- - Added `PRIMARY_CONTENT_UPDATED` status to `EventShortMessageStatus` for when only primary content changes are detected.
15
-
16
- ### Changed
17
- - `BaseEntityProcessor` update flow now distinguishes between primary-content-only changes and no changes, returning the updated entity when only the thumbnail was synced.
18
- - Improved `FlexPLMConnect.getRequest` function and added unit tests.
19
-
20
- ## [1.2.1] - 2026-04-08
21
-
22
- ### Added
23
- - Added EventShortMessageStatus status values for adding items to projects functionality.
24
- - Added `TypeConversionUtils.isOutboundCreatableFromEntity` method to determine if VibeIQ entities are creatable in FlexPLM (defaults to true).
25
-
26
- ### Changed
27
- - Added optional `context` parameter to `TypeConversionUtils.isInboundCreatableFromObject` method to allow passing context data to map file `isInboundCreatable` functions.
28
-
29
- ## [1.1.66] - (initial changelog entry)
30
-
31
- - Initial changelog. Prior releases did not include a changelog.
32
- See git history for changes predating this entry.