@intelligentgraphics/ig.gfx.packager 3.0.17 → 3.0.19
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/build/bin.mjs +1 -1
- package/build/{cli-69a2e2f1.mjs → cli-4b4eb819.mjs} +9 -9
- package/build/cli-4b4eb819.mjs.map +1 -0
- package/build/{dependencies-4e6ba0ea.mjs → dependencies-7b889e67.mjs} +2 -2
- package/build/{dependencies-4e6ba0ea.mjs.map → dependencies-7b889e67.mjs.map} +1 -1
- package/build/{generateIndex-e1304f50.mjs → generateIndex-1c76f3b7.mjs} +2 -2
- package/build/{generateIndex-e1304f50.mjs.map → generateIndex-1c76f3b7.mjs.map} +1 -1
- package/build/{generateParameterType-a547b489.mjs → generateParameterType-ecd8f4b2.mjs} +2 -2
- package/build/{generateParameterType-a547b489.mjs.map → generateParameterType-ecd8f4b2.mjs.map} +1 -1
- package/build/{index-aecc36ad.mjs → index-14f27618.mjs} +336 -10
- package/build/index-14f27618.mjs.map +1 -0
- package/build/{index-ce491f2d.mjs → index-4dd728d6.mjs} +7 -7
- package/build/index-4dd728d6.mjs.map +1 -0
- package/build/{postinstall-6366aa29.mjs → postinstall-dce685cf.mjs} +3 -3
- package/build/{postinstall-6366aa29.mjs.map → postinstall-dce685cf.mjs.map} +1 -1
- package/build/{publishNpm-7fe8b8ec.mjs → publishNpm-0bfe5bda.mjs} +4 -4
- package/build/{publishNpm-7fe8b8ec.mjs.map → publishNpm-0bfe5bda.mjs.map} +1 -1
- package/build/{versionFile-28e7ec79.mjs → versionFile-041c0e79.mjs} +2 -2
- package/build/{versionFile-28e7ec79.mjs.map → versionFile-041c0e79.mjs.map} +1 -1
- package/lib/lib.mjs +337 -11
- package/package.json +2 -2
- package/readme.md +8 -0
- package/build/cli-69a2e2f1.mjs.map +0 -1
- package/build/index-aecc36ad.mjs.map +0 -1
- package/build/index-ce491f2d.mjs.map +0 -1
package/build/{generateParameterType-a547b489.mjs.map → generateParameterType-ecd8f4b2.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateParameterType-
|
|
1
|
+
{"version":3,"file":"generateParameterType-ecd8f4b2.mjs","sources":["../src/commands/generateParameterType.ts"],"sourcesContent":["import ts from \"typescript\";\nimport * as fs from \"fs\";\nimport * as path from \"path\";\nimport * as os from \"os\";\n\nimport {\n\tPackageLocation,\n\tgetCreatorIndexParameterPrimaryJSType,\n\treadPackageCreatorIndex,\n\treadPackageCreatorManifest,\n} from \"@intelligentgraphics/ig.gfx.tools.core\";\n\nexport interface GenerateParameterTypeOptions {\n\tlocation: PackageLocation;\n\tname: string;\n}\n\nexport const generateParameterType = ({\n\tlocation,\n\tname,\n}: GenerateParameterTypeOptions) => {\n\tconst index = readPackageCreatorIndex(location);\n\tconst manifest = readPackageCreatorManifest(location);\n\n\tif (index === undefined) {\n\t\tthrow new Error(`Could not find the _Index.json file`);\n\t}\n\n\tlet qualifiedName = name;\n\tlet className = name;\n\n\tconst scope = manifest.Scope ?? manifest.Package;\n\n\tif (name.startsWith(scope)) {\n\t\tclassName = name.slice(scope.length + 1);\n\t} else {\n\t\tqualifiedName = `${scope}.${name}`;\n\t}\n\n\tconst informations = index.find((item) => item.Name === qualifiedName);\n\n\tif (informations === undefined) {\n\t\tthrow new Error(`Could not find an index entry for ${name}`);\n\t}\n\n\tconst members: ts.TypeElement[] = [];\n\n\tif (informations.Parameters !== undefined) {\n\t\tconst sortedList = informations.Parameters.slice();\n\t\tsortedList.sort((a, b) => a.DisplayIndex - b.DisplayIndex);\n\n\t\tfor (const parameter of sortedList) {\n\t\t\tconst jsType = getCreatorIndexParameterPrimaryJSType(\n\t\t\t\tparameter.Type,\n\t\t\t);\n\n\t\t\tconst type =\n\t\t\t\tjsType === \"string\"\n\t\t\t\t\t? ts.factory.createTypeReferenceNode(\"string\")\n\t\t\t\t\t: ts.factory.createUnionTypeNode([\n\t\t\t\t\t\t\tts.factory.createTypeReferenceNode(jsType),\n\t\t\t\t\t\t\tts.factory.createTypeReferenceNode(\"string\"),\n\t\t\t\t\t ]);\n\n\t\t\tlet propertySignature = ts.factory.createPropertySignature(\n\t\t\t\tundefined,\n\t\t\t\tparameter.Name,\n\t\t\t\tparameter.Required\n\t\t\t\t\t? undefined\n\t\t\t\t\t: ts.factory.createToken(ts.SyntaxKind.QuestionToken),\n\t\t\t\ttype,\n\t\t\t);\n\n\t\t\tconst jsdocParts: string[] = [];\n\n\t\t\tif (parameter.Description !== undefined) {\n\t\t\t\tjsdocParts.push(parameter.Description, \"\");\n\t\t\t}\n\n\t\t\tjsdocParts.push(`@creatorType ${parameter.Type}`);\n\n\t\t\tif (jsType === \"string\") {\n\t\t\t\tjsdocParts.push(`@default \"${parameter.Default}\"`);\n\t\t\t} else {\n\t\t\t\tjsdocParts.push(`@default ${parameter.Default}`);\n\t\t\t}\n\n\t\t\tconst jsdocContent = jsdocParts\n\t\t\t\t.map((part) => `* ${part}`)\n\t\t\t\t.join(\"\\n \");\n\t\t\tpropertySignature = ts.addSyntheticLeadingComment(\n\t\t\t\tpropertySignature,\n\t\t\t\tts.SyntaxKind.MultiLineCommentTrivia,\n\t\t\t\t`*\\n ${jsdocContent}\\n `,\n\t\t\t\ttrue,\n\t\t\t);\n\n\t\t\tmembers.push(propertySignature);\n\t\t}\n\t}\n\n\tconst interfaceName = `${className}Params`;\n\n\tlet interfaceDeclaration = ts.factory.createInterfaceDeclaration(\n\t\tundefined,\n\t\tinterfaceName,\n\t\tundefined,\n\t\tundefined,\n\t\tmembers,\n\t);\n\n\tinterfaceDeclaration = ts.addSyntheticLeadingComment(\n\t\tinterfaceDeclaration,\n\t\tts.SyntaxKind.MultiLineCommentTrivia,\n\t\t`*\\n * Parameters for the ${className} class\\n `,\n\t\ttrue,\n\t);\n\n\tconst printer = ts.createPrinter();\n\tconst content = printer\n\t\t.printNode(\n\t\t\tts.EmitHint.Unspecified,\n\t\t\tinterfaceDeclaration,\n\t\t\tts.createSourceFile(\"index.ts\", \"\", ts.ScriptTarget.Latest),\n\t\t)\n\t\t.replace(/ /g, \"\\t\");\n\n\tconst outFile = path.join(location.scriptsDir, `${interfaceName}.txt`);\n\n\tfs.writeFileSync(\n\t\toutFile,\n\t\t`Generated parameters interface for ${className}. Insert the interface declaration next to the class and use it as the type for the parameters. Afterwards you can delete this file.` +\n\t\t\tos.EOL +\n\t\t\tos.EOL +\n\t\t\tcontent,\n\t);\n};\n"],"names":["generateParameterType","location","name","index","readPackageCreatorIndex","manifest","readPackageCreatorManifest","undefined","Error","qualifiedName","className","scope","Scope","Package","startsWith","slice","length","informations","find","item","Name","members","Parameters","sortedList","sort","a","b","DisplayIndex","parameter","jsType","getCreatorIndexParameterPrimaryJSType","Type","type","ts","factory","createTypeReferenceNode","createUnionTypeNode","propertySignature","createPropertySignature","Required","createToken","SyntaxKind","QuestionToken","jsdocParts","Description","push","Default","jsdocContent","map","part","join","addSyntheticLeadingComment","MultiLineCommentTrivia","interfaceName","interfaceDeclaration","createInterfaceDeclaration","printer","createPrinter","content","printNode","EmitHint","Unspecified","createSourceFile","ScriptTarget","Latest","replace","outFile","path","scriptsDir","fs","writeFileSync","os","EOL"],"mappings":";;;;;;;;;;;;;;;;;;;;AAiBO,MAAMA,wBAAwB,CAAC,EACrCC,WACAC,IAAAA,GAC8B,GAAK;AACnC,IAAA,MAAMC,QAAQC,uBAAwBH,CAAAA,QAAAA,CAAAA,CAAAA;AACtC,IAAA,MAAMI,WAAWC,0BAA2BL,CAAAA,QAAAA,CAAAA,CAAAA;AAE5C,IAAA,IAAIE,UAAUI,SAAW,EAAA;AACxB,QAAA,MAAM,IAAIC,KAAAA,CAAM,CAAC,mCAAmC,CAAC,CAAE,CAAA;KACvD;AAED,IAAA,IAAIC,aAAgBP,GAAAA,IAAAA,CAAAA;AACpB,IAAA,IAAIQ,SAAYR,GAAAA,IAAAA,CAAAA;AAEhB,IAAA,MAAMS,KAAQN,GAAAA,QAAAA,CAASO,KAAK,IAAIP,SAASQ,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,CAAAA;AACd,SAAA;KACA;AAED,IAAA,MAAMgB,aAAgB,GAAA,CAAC,EAAE3C,SAAAA,CAAU,MAAM,CAAC,CAAA;IAE1C,IAAI4C,oBAAAA,GAAuBrB,GAAGC,OAAO,CAACqB,0BAA0B,CAC/DhD,SAAAA,EACA8C,aACA9C,EAAAA,SAAAA,EACAA,SACAc,EAAAA,OAAAA,CAAAA,CAAAA;AAGDiC,IAAAA,oBAAAA,GAAuBrB,GAAGkB,0BAA0B,CACnDG,oBACArB,EAAAA,EAAAA,CAAGQ,UAAU,CAACW,sBAAsB,EACpC,CAAC,yBAAyB,EAAE1C,SAAAA,CAAU,SAAS,CAAC,EAChD,IAAI,CAAA,CAAA;IAGL,MAAM8C,OAAAA,GAAUvB,GAAGwB,aAAa,EAAA,CAAA;IAChC,MAAMC,OAAAA,GAAUF,QACdG,SAAS,CACT1B,GAAG2B,QAAQ,CAACC,WAAW,EACvBP,oBACArB,EAAAA,EAAAA,CAAG6B,gBAAgB,CAAC,UAAA,EAAY,IAAI7B,EAAG8B,CAAAA,YAAY,CAACC,MAAM,CAAA,CAAA,CAE1DC,OAAO,CAAC,OAAS,EAAA,IAAA,CAAA,CAAA;IAEnB,MAAMC,OAAAA,GAAUC,IAAKjB,CAAAA,IAAI,CAACjD,QAAAA,CAASmE,UAAU,EAAE,CAAC,EAAEf,aAAc,CAAA,IAAI,CAAC,CAAA,CAAA;AAErEgB,IAAAA,EAAAA,CAAGC,aAAa,CACfJ,OACA,EAAA,CAAC,mCAAmC,EAAExD,SAAAA,CAAU,oIAAoI,CAAC,GACpL6D,EAAGC,CAAAA,GAAG,GACND,EAAAA,CAAGC,GAAG,GACNd,OAAAA,CAAAA,CAAAA;AAEH;;;;"}
|
|
@@ -3,11 +3,11 @@ import * as fs from 'fs';
|
|
|
3
3
|
import * as terser from 'terser';
|
|
4
4
|
import 'resolve';
|
|
5
5
|
import 'write-pkg';
|
|
6
|
-
import { r as readPackageCreatorManifest, c as readPackageAnimationList, q as readPackageNpmManifest } from './cli-
|
|
6
|
+
import { r as readPackageCreatorManifest, c as readPackageAnimationList, q as readPackageNpmManifest } from './cli-4b4eb819.mjs';
|
|
7
7
|
import { g as getPackageTypescriptFiles } from './scripts-7ed8dff6.mjs';
|
|
8
8
|
import 'node:path';
|
|
9
9
|
import 'node:fs';
|
|
10
|
-
import
|
|
10
|
+
import 'axios';
|
|
11
11
|
import ts from 'typescript';
|
|
12
12
|
import typedoc from 'typedoc';
|
|
13
13
|
import glob from 'glob';
|
|
@@ -149,16 +149,342 @@ const toposort = (packages)=>{
|
|
|
149
149
|
return result;
|
|
150
150
|
};
|
|
151
151
|
|
|
152
|
+
var animationSchema = {
|
|
153
|
+
$schema: "http://json-schema.org/draft-07/schema",
|
|
154
|
+
$id: "https://archive.intelligentgraphics.biz/schemas/gfx/animation.json",
|
|
155
|
+
$comment: "Version 2023-02-17, Source: ig.data.gfx/Specs/animation.json",
|
|
156
|
+
title: "Animation description format",
|
|
157
|
+
additionalProperties: false,
|
|
158
|
+
type: "object",
|
|
159
|
+
properties: {
|
|
160
|
+
$schema: {
|
|
161
|
+
type: "string"
|
|
162
|
+
},
|
|
163
|
+
Id: {
|
|
164
|
+
type: "string",
|
|
165
|
+
description: "Animation id, to be unique in the project scope. Needs to be a valid JavaScript identifier."
|
|
166
|
+
},
|
|
167
|
+
Animations: {
|
|
168
|
+
type: "array",
|
|
169
|
+
description: "Declaration of animation states for gfx objects",
|
|
170
|
+
items: {
|
|
171
|
+
type: "object",
|
|
172
|
+
additionalProperties: false,
|
|
173
|
+
properties: {
|
|
174
|
+
_: {
|
|
175
|
+
type: "string",
|
|
176
|
+
description: "Comment"
|
|
177
|
+
},
|
|
178
|
+
Path: {
|
|
179
|
+
$ref: "#/definitions/igxcPath"
|
|
180
|
+
},
|
|
181
|
+
States: {
|
|
182
|
+
type: "object",
|
|
183
|
+
additionalProperties: {
|
|
184
|
+
type: "object",
|
|
185
|
+
additionalProperties: false,
|
|
186
|
+
properties: {
|
|
187
|
+
Position: {
|
|
188
|
+
$ref: "#/definitions/vec3"
|
|
189
|
+
},
|
|
190
|
+
Rotation: {
|
|
191
|
+
$ref: "#/definitions/rotation"
|
|
192
|
+
},
|
|
193
|
+
Scaling: {
|
|
194
|
+
$ref: "#/definitions/vec3"
|
|
195
|
+
},
|
|
196
|
+
Visibility: {
|
|
197
|
+
type: "boolean"
|
|
198
|
+
},
|
|
199
|
+
Deformation: {
|
|
200
|
+
anyOf: [
|
|
201
|
+
{
|
|
202
|
+
type: "number"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
type: "string"
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
Kinematics: {
|
|
216
|
+
oneOf: [
|
|
217
|
+
{
|
|
218
|
+
$ref: "#/definitions/kinematicChain"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
type: "array",
|
|
222
|
+
items: {
|
|
223
|
+
$ref: "#/definitions/kinematicChain"
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
]
|
|
227
|
+
},
|
|
228
|
+
LinkedPoints: {
|
|
229
|
+
type: "object",
|
|
230
|
+
additionalProperties: {
|
|
231
|
+
type: "array",
|
|
232
|
+
items: {
|
|
233
|
+
type: "string"
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
_: {
|
|
238
|
+
type: "string",
|
|
239
|
+
description: "Comment"
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
definitions: {
|
|
243
|
+
vec3: {
|
|
244
|
+
type: "object",
|
|
245
|
+
additionalProperties: false,
|
|
246
|
+
properties: {
|
|
247
|
+
X: {
|
|
248
|
+
anyOf: [
|
|
249
|
+
{
|
|
250
|
+
type: "number"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
type: "string"
|
|
254
|
+
}
|
|
255
|
+
]
|
|
256
|
+
},
|
|
257
|
+
Y: {
|
|
258
|
+
anyOf: [
|
|
259
|
+
{
|
|
260
|
+
type: "number"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
type: "string"
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
},
|
|
267
|
+
Z: {
|
|
268
|
+
anyOf: [
|
|
269
|
+
{
|
|
270
|
+
type: "number"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
type: "string"
|
|
274
|
+
}
|
|
275
|
+
]
|
|
276
|
+
},
|
|
277
|
+
_: {
|
|
278
|
+
type: "string",
|
|
279
|
+
description: "Comment"
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
rotation: {
|
|
284
|
+
type: "object",
|
|
285
|
+
additionalProperties: false,
|
|
286
|
+
properties: {
|
|
287
|
+
Q: {
|
|
288
|
+
description: "If true, the rotation is considered to be a Quaternion. Otherwise, it's interpreted as Euler arcs and W will be ignored.",
|
|
289
|
+
type: "boolean"
|
|
290
|
+
},
|
|
291
|
+
X: {
|
|
292
|
+
anyOf: [
|
|
293
|
+
{
|
|
294
|
+
type: "number"
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
type: "string"
|
|
298
|
+
}
|
|
299
|
+
]
|
|
300
|
+
},
|
|
301
|
+
Y: {
|
|
302
|
+
anyOf: [
|
|
303
|
+
{
|
|
304
|
+
type: "number"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
type: "string"
|
|
308
|
+
}
|
|
309
|
+
]
|
|
310
|
+
},
|
|
311
|
+
Z: {
|
|
312
|
+
anyOf: [
|
|
313
|
+
{
|
|
314
|
+
type: "number"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
type: "string"
|
|
318
|
+
}
|
|
319
|
+
]
|
|
320
|
+
},
|
|
321
|
+
W: {
|
|
322
|
+
anyOf: [
|
|
323
|
+
{
|
|
324
|
+
type: "number"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
type: "string"
|
|
328
|
+
}
|
|
329
|
+
]
|
|
330
|
+
},
|
|
331
|
+
_: {
|
|
332
|
+
type: "string",
|
|
333
|
+
description: "Comment"
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
igxcPath: {
|
|
338
|
+
type: "string",
|
|
339
|
+
description: "Relative path of the target object",
|
|
340
|
+
pattern: "^((o|e)\\d+(\\.(o|e)\\d+)*|\\.)$"
|
|
341
|
+
},
|
|
342
|
+
param: {
|
|
343
|
+
type: "string",
|
|
344
|
+
pattern: "^Param\\d+$"
|
|
345
|
+
},
|
|
346
|
+
kinematicChain: {
|
|
347
|
+
type: "object",
|
|
348
|
+
additionalProperties: false,
|
|
349
|
+
properties: {
|
|
350
|
+
GeometryBase: {
|
|
351
|
+
type: "string"
|
|
352
|
+
},
|
|
353
|
+
Joints: {
|
|
354
|
+
type: "array",
|
|
355
|
+
items: {
|
|
356
|
+
type: "object",
|
|
357
|
+
additionalProperties: false,
|
|
358
|
+
properties: {
|
|
359
|
+
Name: {
|
|
360
|
+
oneOf: [
|
|
361
|
+
{
|
|
362
|
+
$ref: "#/definitions/param"
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
type: "string"
|
|
366
|
+
}
|
|
367
|
+
]
|
|
368
|
+
},
|
|
369
|
+
HeadX: {
|
|
370
|
+
oneOf: [
|
|
371
|
+
{
|
|
372
|
+
$ref: "#/definitions/param"
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
$ref: "#/definitions/igxcPath"
|
|
376
|
+
}
|
|
377
|
+
]
|
|
378
|
+
},
|
|
379
|
+
HeadY: {
|
|
380
|
+
oneOf: [
|
|
381
|
+
{
|
|
382
|
+
$ref: "#/definitions/param"
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
$ref: "#/definitions/igxcPath"
|
|
386
|
+
}
|
|
387
|
+
]
|
|
388
|
+
},
|
|
389
|
+
HeadZ: {
|
|
390
|
+
oneOf: [
|
|
391
|
+
{
|
|
392
|
+
$ref: "#/definitions/param"
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
$ref: "#/definitions/igxcPath"
|
|
396
|
+
}
|
|
397
|
+
]
|
|
398
|
+
},
|
|
399
|
+
Tail: {
|
|
400
|
+
oneOf: [
|
|
401
|
+
{
|
|
402
|
+
$ref: "#/definitions/param"
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
$ref: "#/definitions/igxcPath"
|
|
406
|
+
}
|
|
407
|
+
]
|
|
408
|
+
},
|
|
409
|
+
LimitLeft: {
|
|
410
|
+
type: "number"
|
|
411
|
+
},
|
|
412
|
+
LimitRight: {
|
|
413
|
+
type: "number"
|
|
414
|
+
},
|
|
415
|
+
LimitUp: {
|
|
416
|
+
type: "number"
|
|
417
|
+
},
|
|
418
|
+
LimitDown: {
|
|
419
|
+
type: "number"
|
|
420
|
+
},
|
|
421
|
+
FollowJointNode: {
|
|
422
|
+
$ref: "#/definitions/igxcPath"
|
|
423
|
+
},
|
|
424
|
+
_TargetNodeForFollow: {
|
|
425
|
+
type: "string"
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
Target: {
|
|
431
|
+
oneOf: [
|
|
432
|
+
{
|
|
433
|
+
$ref: "#/definitions/igxcPath"
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
$ref: "#/definitions/param"
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
type: "string",
|
|
440
|
+
enum: [
|
|
441
|
+
"subbase"
|
|
442
|
+
]
|
|
443
|
+
}
|
|
444
|
+
]
|
|
445
|
+
},
|
|
446
|
+
Parent: {
|
|
447
|
+
oneOf: [
|
|
448
|
+
{
|
|
449
|
+
$ref: "#/definitions/igxcPath"
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
type: "string",
|
|
453
|
+
enum: [
|
|
454
|
+
"root"
|
|
455
|
+
]
|
|
456
|
+
}
|
|
457
|
+
]
|
|
458
|
+
},
|
|
459
|
+
Tolerance: {
|
|
460
|
+
type: "number"
|
|
461
|
+
},
|
|
462
|
+
MaxIterations: {
|
|
463
|
+
type: "integer"
|
|
464
|
+
},
|
|
465
|
+
_: {
|
|
466
|
+
type: "string",
|
|
467
|
+
description: "Comment"
|
|
468
|
+
},
|
|
469
|
+
__: {
|
|
470
|
+
type: "string",
|
|
471
|
+
description: "Super Comment"
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
};
|
|
477
|
+
|
|
152
478
|
let validateAnimationJson;
|
|
153
479
|
const getAnimationJsonValidation = async ()=>{
|
|
154
480
|
if (validateAnimationJson === undefined) {
|
|
155
|
-
validateAnimationJson =
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
481
|
+
validateAnimationJson = new Ajv({
|
|
482
|
+
coerceTypes: true,
|
|
483
|
+
allErrors: true,
|
|
484
|
+
removeAdditional: true,
|
|
485
|
+
useDefaults: "empty",
|
|
486
|
+
validateSchema: "log"
|
|
487
|
+
}).compile(animationSchema);
|
|
162
488
|
}
|
|
163
489
|
return validateAnimationJson;
|
|
164
490
|
};
|
|
@@ -377,4 +703,4 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
377
703
|
});
|
|
378
704
|
|
|
379
705
|
export { buildFolders as b, index as i, logPackageMessage as l };
|
|
380
|
-
//# sourceMappingURL=index-
|
|
706
|
+
//# sourceMappingURL=index-14f27618.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-14f27618.mjs","sources":["../../tools.core/build/log.mjs","../src/commands/build/tsc.ts","../src/commands/build/docs.ts","../src/lib/toposort.ts","../src/commands/build/animation.schema.ts","../src/commands/build/index.ts"],"sourcesContent":["const logPackageMessage = (name, step, index, total)=>{\n const numLength = total === undefined ? undefined : total.toString().length;\n const indexString = total === undefined || total < 2 ? \"\" : `${index.toString().padStart(numLength, \"0\")}/${total} `;\n const identifierString = `${indexString}${name.padEnd(15)}`;\n console.log(`${identifierString} >> ${step}`);\n};\n\nexport { logPackageMessage };\n//# sourceMappingURL=log.mjs.map\n","import ts from \"typescript\";\nimport * as path from \"path\";\nimport * as fs from \"fs\";\n\nimport { PackageLocation } from \"../../lib/package\";\n\nimport { FolderBuilder } from \".\";\nimport { getPackageTypescriptFiles } from \"../../lib/scripts\";\n\nexport const tryReadTsConfig = (location: PackageLocation) => {\n\tconst { config } = ts.readConfigFile(\n\t\tpath.join(location.scriptsDir, \"tsconfig.json\"),\n\t\t(path) => {\n\t\t\ttry {\n\t\t\t\treturn fs.readFileSync(path, \"utf8\");\n\t\t\t} catch {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t},\n\t);\n\n\treturn config as {\n\t\tcompilerOptions: ts.CompilerOptions;\n\t};\n};\n\nexport const build: FolderBuilder = async (\n\tlocation: PackageLocation,\n\toutputDir: string,\n) => {\n\tconst config = tryReadTsConfig(location);\n\n\tconfig.compilerOptions.lib = [\"es5\", \"dom\"];\n\n\tconst result = ts.convertCompilerOptionsFromJson(\n\t\tconfig.compilerOptions,\n\t\tlocation.scriptsDir,\n\t);\n\n\tconst compilerOptions: ts.CompilerOptions = {\n\t\t...result.options,\n\t\tremoveComments: false,\n\t\tdeclaration: true,\n\t\tsourceMap: false,\n\t\t// We don't use tsc to actually emit the files, but we still need to set the correct\n\t\t// output directory so the compiler can rewrite the `reference path` directives.\n\t\toutFile: path.join(outputDir, \"out.js\"),\n\t\ttarget: ts.ScriptTarget.ES5,\n\t\tnoEmitOnError: true,\n\t};\n\n\tconst host = ts.createCompilerHost(compilerOptions);\n\thost.getCurrentDirectory = () => location.scriptsDir;\n\n\tlet js: string | undefined;\n\tlet definitions: string | undefined;\n\n\thost.writeFile = (fileName, data, writeByteOrderMark) => {\n\t\tif (fileName.endsWith(\".js\")) {\n\t\t\tjs = data;\n\t\t} else if (fileName.endsWith(\".d.ts\")) {\n\t\t\tdefinitions = data;\n\t\t}\n\t};\n\n\tconst files = getPackageTypescriptFiles(location);\n\n\tif (files.length === 0) {\n\t\tthrow new Error(\n\t\t\t`Expected typescript files to exist when building a package. Packages only consisting of animation jsons do not need to be built.`,\n\t\t);\n\t}\n\n\tconst programOptions: ts.CreateProgramOptions = {\n\t\trootNames: files,\n\t\toptions: compilerOptions,\n\t\thost,\n\t};\n\n\tconst program = ts.createProgram(programOptions);\n\tconst emitResult = program.emit();\n\tconst allDiagnostics = ts.getPreEmitDiagnostics(program);\n\n\tif (!emitResult.emitSkipped) {\n\t\tif (allDiagnostics.length > 0) {\n\t\t\tconsole.log(allDiagnostics.map(createErrorMessage).join(\"\\n\"));\n\t\t}\n\n\t\tif (js === undefined || definitions === undefined) {\n\t\t\tthrow new Error(`Unexpected: no js or definitions were created`);\n\t\t}\n\n\t\treturn { js, definitions };\n\t}\n\n\tconst error = allDiagnostics.map(createErrorMessage).join(\"\\n\");\n\n\tthrow new Error(error);\n};\n\nconst createErrorMessage = (diagnostic: ts.Diagnostic) => {\n\tif (!diagnostic.file) {\n\t\treturn `${ts.flattenDiagnosticMessageText(\n\t\t\tdiagnostic.messageText,\n\t\t\t\"\\n\",\n\t\t)}`;\n\t}\n\n\tconst { line, character } = diagnostic.file.getLineAndCharacterOfPosition(\n\t\tdiagnostic.start!,\n\t);\n\n\tconst message = ts.flattenDiagnosticMessageText(\n\t\tdiagnostic.messageText,\n\t\t\"\\n\",\n\t);\n\n\treturn `${diagnostic.file.fileName} (${line + 1},${\n\t\tcharacter + 1\n\t}): ${message}`;\n};\n","import typedoc from \"typedoc\";\nimport glob from \"glob\";\nimport ts from \"typescript\";\nimport * as path from \"path\";\nimport { PackageLocation } from \"../../lib/package\";\n\nexport const generateDocs = async (\n\tlocation: PackageLocation,\n\tdeclarationFile: string,\n\toutFolder: string,\n\tname: string,\n) => {\n\tconst app = new typedoc.Application();\n\n\tconst mediaDir = path.join(location.manifestDir, \"Media\");\n\n\tapp.bootstrap({\n\t\tentryPoints: [declarationFile],\n\t\tmedia: mediaDir,\n\t\tout: outFolder,\n\t\ttsconfig: path.join(location.scriptsDir, \"tsconfig.json\"),\n\t\tskipErrorChecking: true,\n\t});\n\n\tapp.options.setCompilerOptions(\n\t\t[declarationFile],\n\t\t{\n\t\t\ttarget: ts.ScriptTarget.ES5,\n\t\t},\n\t\tundefined,\n\t);\n\n\tapp.options.setValue(\"name\", name);\n\n\tconst [readmePath] = glob.sync(\"**/readme.md\", {\n\t\tabsolute: true,\n\t\tcwd: location.manifestDir,\n\t});\n\n\tif (readmePath) {\n\t\tapp.options.setValue(\"readme\", readmePath);\n\t}\n\n\tconst project = app.convert();\n\n\tif (project) {\n\t\tawait app.generateDocs(project, outFolder);\n\t}\n};\n","// Stolen from ig.tools.core\n\nexport const toposort = (packages: Record<string, string[]>) => {\n\tconst queue = Object.getOwnPropertyNames(packages);\n\tconst result: string[] = [];\n\n\tlet index = 0;\n\n\twhile (queue.length > 0) {\n\t\tif (index >= queue.length) {\n\t\t\tthrow new Error(\"Packages can not have cyclic dependencies\");\n\t\t}\n\n\t\tconst queueEntry = queue[index];\n\n\t\tconst dependencies = packages[queueEntry];\n\t\tconst dependencyQueued = dependencies.some((dependency) =>\n\t\t\tqueue.includes(dependency),\n\t\t);\n\n\t\tif (dependencyQueued) {\n\t\t\tindex++;\n\t\t\tcontinue;\n\t\t}\n\n\t\tqueue.splice(index, 1);\n\t\tindex = 0;\n\t\tresult.push(queueEntry);\n\t}\n\n\treturn result;\n};\n","export default {\n\t$schema: \"http://json-schema.org/draft-07/schema\",\n\t$id: \"https://archive.intelligentgraphics.biz/schemas/gfx/animation.json\",\n\t$comment: \"Version 2023-02-17, Source: ig.data.gfx/Specs/animation.json\",\n\ttitle: \"Animation description format\",\n\tadditionalProperties: false,\n\ttype: \"object\",\n\tproperties: {\n\t\t$schema: {\n\t\t\ttype: \"string\",\n\t\t},\n\t\tId: {\n\t\t\ttype: \"string\",\n\t\t\tdescription:\n\t\t\t\t\"Animation id, to be unique in the project scope. Needs to be a valid JavaScript identifier.\",\n\t\t},\n\t\tAnimations: {\n\t\t\ttype: \"array\",\n\t\t\tdescription: \"Declaration of animation states for gfx objects\",\n\t\t\titems: {\n\t\t\t\ttype: \"object\",\n\t\t\t\tadditionalProperties: false,\n\t\t\t\tproperties: {\n\t\t\t\t\t_: {\n\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\tdescription: \"Comment\",\n\t\t\t\t\t},\n\t\t\t\t\tPath: {\n\t\t\t\t\t\t$ref: \"#/definitions/igxcPath\",\n\t\t\t\t\t},\n\t\t\t\t\tStates: {\n\t\t\t\t\t\ttype: \"object\",\n\t\t\t\t\t\tadditionalProperties: {\n\t\t\t\t\t\t\ttype: \"object\",\n\t\t\t\t\t\t\tadditionalProperties: false,\n\t\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\t\tPosition: {\n\t\t\t\t\t\t\t\t\t$ref: \"#/definitions/vec3\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tRotation: {\n\t\t\t\t\t\t\t\t\t$ref: \"#/definitions/rotation\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tScaling: {\n\t\t\t\t\t\t\t\t\t$ref: \"#/definitions/vec3\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tVisibility: {\n\t\t\t\t\t\t\t\t\ttype: \"boolean\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tDeformation: {\n\t\t\t\t\t\t\t\t\tanyOf: [\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tKinematics: {\n\t\t\toneOf: [\n\t\t\t\t{\n\t\t\t\t\t$ref: \"#/definitions/kinematicChain\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: \"array\",\n\t\t\t\t\titems: {\n\t\t\t\t\t\t$ref: \"#/definitions/kinematicChain\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t\tLinkedPoints: {\n\t\t\ttype: \"object\",\n\t\t\tadditionalProperties: {\n\t\t\t\ttype: \"array\",\n\t\t\t\titems: {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t_: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Comment\",\n\t\t},\n\t},\n\tdefinitions: {\n\t\tvec3: {\n\t\t\ttype: \"object\",\n\t\t\tadditionalProperties: false,\n\t\t\tproperties: {\n\t\t\t\tX: {\n\t\t\t\t\tanyOf: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\tY: {\n\t\t\t\t\tanyOf: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\tZ: {\n\t\t\t\t\tanyOf: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\t_: {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tdescription: \"Comment\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\trotation: {\n\t\t\ttype: \"object\",\n\t\t\tadditionalProperties: false,\n\t\t\tproperties: {\n\t\t\t\tQ: {\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t\"If true, the rotation is considered to be a Quaternion. Otherwise, it's interpreted as Euler arcs and W will be ignored.\",\n\t\t\t\t\ttype: \"boolean\",\n\t\t\t\t},\n\t\t\t\tX: {\n\t\t\t\t\tanyOf: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\tY: {\n\t\t\t\t\tanyOf: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\tZ: {\n\t\t\t\t\tanyOf: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\tW: {\n\t\t\t\t\tanyOf: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\t_: {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tdescription: \"Comment\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tigxcPath: {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Relative path of the target object\",\n\t\t\tpattern: \"^((o|e)\\\\d+(\\\\.(o|e)\\\\d+)*|\\\\.)$\",\n\t\t},\n\t\tparam: {\n\t\t\ttype: \"string\",\n\t\t\tpattern: \"^Param\\\\d+$\",\n\t\t},\n\t\tkinematicChain: {\n\t\t\ttype: \"object\",\n\t\t\tadditionalProperties: false,\n\t\t\tproperties: {\n\t\t\t\tGeometryBase: {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t},\n\t\t\t\tJoints: {\n\t\t\t\t\ttype: \"array\",\n\t\t\t\t\titems: {\n\t\t\t\t\t\ttype: \"object\",\n\t\t\t\t\t\tadditionalProperties: false,\n\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\tName: {\n\t\t\t\t\t\t\t\toneOf: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$ref: \"#/definitions/param\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tHeadX: {\n\t\t\t\t\t\t\t\toneOf: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$ref: \"#/definitions/param\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$ref: \"#/definitions/igxcPath\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tHeadY: {\n\t\t\t\t\t\t\t\toneOf: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$ref: \"#/definitions/param\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$ref: \"#/definitions/igxcPath\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tHeadZ: {\n\t\t\t\t\t\t\t\toneOf: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$ref: \"#/definitions/param\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$ref: \"#/definitions/igxcPath\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tTail: {\n\t\t\t\t\t\t\t\toneOf: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$ref: \"#/definitions/param\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$ref: \"#/definitions/igxcPath\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tLimitLeft: {\n\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tLimitRight: {\n\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tLimitUp: {\n\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tLimitDown: {\n\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tFollowJointNode: {\n\t\t\t\t\t\t\t\t$ref: \"#/definitions/igxcPath\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t_TargetNodeForFollow: {\n\t\t\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tTarget: {\n\t\t\t\t\toneOf: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$ref: \"#/definitions/igxcPath\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$ref: \"#/definitions/param\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\t\tenum: [\"subbase\"],\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\tParent: {\n\t\t\t\t\toneOf: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$ref: \"#/definitions/igxcPath\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\t\tenum: [\"root\"],\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\tTolerance: {\n\t\t\t\t\ttype: \"number\",\n\t\t\t\t},\n\t\t\t\tMaxIterations: {\n\t\t\t\t\ttype: \"integer\",\n\t\t\t\t},\n\t\t\t\t_: {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tdescription: \"Comment\",\n\t\t\t\t},\n\t\t\t\t__: {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tdescription: \"Super Comment\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n};\n","import * as path from \"path\";\nimport * as fs from \"fs\";\nimport * as terser from \"terser\";\n\nimport { logPackageMessage } from \"../../lib/log\";\nimport { build as tscBuild } from \"./tsc\";\nimport { generateDocs } from \"./docs\";\nimport {\n\tPackageLocation,\n\treadPackageAnimationList,\n\treadPackageCreatorManifest,\n\treadPackageNpmManifest,\n} from \"../../lib/package\";\nimport { WorkspaceLocation } from \"../../lib/workspace\";\nimport { getPackageTypescriptFiles } from \"../../lib/scripts\";\nimport { toposort } from \"../../lib/toposort\";\nimport { PackageJSON } from \"../../lib/packageJSON\";\nimport Ajv, { ValidateFunction } from \"ajv\";\nimport animationSchema from \"./animation.schema\";\n\nexport interface BannerOptions {\n\ttext: string | undefined;\n\tversion: string | undefined;\n\tcommit: string | undefined;\n\tcommitDirty: boolean | undefined;\n\tdate: Date | undefined;\n}\n\nexport interface BuildFoldersOptions {\n\tworkspace: WorkspaceLocation;\n\tpackages: PackageLocation[];\n\toutDir?: string;\n\tminimize: boolean;\n\tbanner?: BannerOptions;\n\tclean?: boolean;\n\tdocs?: boolean;\n}\n\nexport interface BuildFolderOptions extends BuildFoldersOptions {\n\toutFile: string;\n}\n\nexport interface FolderBuilderResult {\n\tjs: string;\n\tdefinitions: string;\n}\n\nexport type FolderBuilder = (\n\tlocation: PackageLocation,\n\toutputDir: string,\n) => Promise<FolderBuilderResult>;\n\ntype FolderData = {\n\tlocation: PackageLocation;\n\tdata?: PackageJSON;\n};\n\nlet validateAnimationJson: ValidateFunction | undefined;\n\nconst getAnimationJsonValidation = async () => {\n\tif (validateAnimationJson === undefined) {\n\t\tvalidateAnimationJson = new Ajv({\n\t\t\tcoerceTypes: true,\n\t\t\tallErrors: true,\n\t\t\tremoveAdditional: true,\n\t\t\tuseDefaults: \"empty\",\n\t\t\tvalidateSchema: \"log\",\n\t\t}).compile(animationSchema);\n\t}\n\n\treturn validateAnimationJson!;\n};\n\nexport const buildFolders = async (options: BuildFoldersOptions) => {\n\tif (options.outDir !== undefined && options.clean) {\n\t\tfs.rmSync(options.outDir, { recursive: true });\n\t}\n\n\tconst workspace = options.workspace;\n\tconst folders = options.packages;\n\n\tlet sortedPackages = sortPackagesByBuildOrder(folders);\n\n\tlet index = 1;\n\n\tfor (const location of sortedPackages) {\n\t\tconst hasTypescript = getPackageTypescriptFiles(location).length > 0;\n\n\t\tensureTsConfig(location);\n\n\t\tconst data = readPackageCreatorManifest(location);\n\n\t\tconst logStep = (step: string) =>\n\t\t\tlogPackageMessage(data.Package, step, index, folders.length);\n\n\t\tconst outputDirectory = options.outDir || location.scriptsDir;\n\t\tfs.mkdirSync(outputDirectory, { recursive: true });\n\n\t\tlet buildResult: {\n\t\t\tjs: string;\n\t\t\tdefinitions?: string;\n\t\t};\n\n\t\tif (hasTypescript) {\n\t\t\tlogStep(\"Compiling typescript to javascript\");\n\t\t\tbuildResult = await tscBuild(location, outputDirectory);\n\t\t} else {\n\t\t\tbuildResult = {\n\t\t\t\tjs: \"\",\n\t\t\t};\n\t\t}\n\n\t\tconst banner = options.banner\n\t\t\t? createBannerComment(options.banner)\n\t\t\t: undefined;\n\n\t\tif (banner) {\n\t\t\tbuildResult.js = banner + \"\\n\" + buildResult.js;\n\t\t\tif (buildResult.definitions !== undefined) {\n\t\t\t\tbuildResult.definitions =\n\t\t\t\t\tbanner + \"\\n\" + buildResult.definitions;\n\t\t\t}\n\t\t}\n\n\t\tconst animations = new Map<string, string>();\n\n\t\tfor (const scriptFilePath of readPackageAnimationList(location)) {\n\t\t\tconst content = fs.readFileSync(scriptFilePath, {\n\t\t\t\tencoding: \"utf8\",\n\t\t\t})!;\n\n\t\t\tlet data: { Id: string; $schema?: string };\n\n\t\t\ttry {\n\t\t\t\tdata = JSON.parse(content);\n\t\t\t} catch (err) {\n\t\t\t\tconst relativePath = path.relative(\n\t\t\t\t\toptions.workspace.path,\n\t\t\t\t\tscriptFilePath,\n\t\t\t\t);\n\n\t\t\t\tif (err instanceof SyntaxError) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t`Encountered invalid syntax in file \"${relativePath}\": ${String(\n\t\t\t\t\t\t\terr,\n\t\t\t\t\t\t)}`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Encountered an unexpected error while parsing animation json file at path \"${relativePath}\"`,\n\t\t\t\t\t{\n\t\t\t\t\t\tcause: err,\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (!data.Id) {\n\t\t\t\tconst fileName = path.basename(\n\t\t\t\t\tscriptFilePath,\n\t\t\t\t\t\".animation.json\",\n\t\t\t\t);\n\t\t\t\tdata.Id = fileName;\n\t\t\t}\n\n\t\t\t(await getAnimationJsonValidation())(data);\n\t\t\tdelete data.$schema;\n\t\t\tanimations.set(data.Id, JSON.stringify(data));\n\t\t}\n\n\t\tif (animations.size > 0) {\n\t\t\tconst scope = data.Scope ?? data.Package;\n\t\t\tconst scopeParts = scope.split(\".\");\n\n\t\t\tbuildResult.js += createNamespace(scopeParts);\n\n\t\t\tfor (const [name, content] of animations) {\n\t\t\t\tbuildResult.js += `${scope}[\"${name}\"] = ` + content + \";\";\n\t\t\t\tlogPackageMessage(\n\t\t\t\t\tdata.Package,\n\t\t\t\t\t`Adding animation ${scope}.${name}`,\n\t\t\t\t);\n\t\t\t}\n\t\t} else if (!hasTypescript) {\n\t\t\tthrow new Error(\n\t\t\t\t`Expected package to have a least one ts file or one animation.json file`,\n\t\t\t);\n\t\t}\n\n\t\tfs.writeFileSync(\n\t\t\tpath.join(outputDirectory, `${data.Package}.js`),\n\t\t\tbuildResult.js,\n\t\t\t{ encoding: \"utf8\" },\n\t\t);\n\t\tif (buildResult.definitions !== undefined) {\n\t\t\tfs.writeFileSync(\n\t\t\t\tpath.join(outputDirectory, `${data.Package}.d.ts`),\n\t\t\t\tbuildResult.definitions,\n\t\t\t\t{ encoding: \"utf8\" },\n\t\t\t);\n\t\t}\n\n\t\tif (options.minimize) {\n\t\t\tconst minifyResult = await terser.minify(buildResult.js, {\n\t\t\t\tecma: 5,\n\t\t\t});\n\n\t\t\tconst minifiedPath = path.join(\n\t\t\t\toutputDirectory,\n\t\t\t\t`${data.Package}.min.js`,\n\t\t\t);\n\t\t\tfs.writeFileSync(minifiedPath, minifyResult.code!, {\n\t\t\t\tencoding: \"utf8\",\n\t\t\t});\n\t\t}\n\n\t\tif (\n\t\t\tlocation.path.includes(\"Basics\") &&\n\t\t\tbuildResult.definitions !== undefined\n\t\t) {\n\t\t\tfs.mkdirSync(path.join(workspace.path, \"lib\"), {\n\t\t\t\trecursive: true,\n\t\t\t});\n\n\t\t\tlogStep(\"Copying basics definition file to the lib folder\");\n\t\t\tfs.writeFileSync(\n\t\t\t\tpath.join(workspace.path, \"lib\", `${data.Package}.d.ts`),\n\t\t\t\tbuildResult.definitions,\n\t\t\t\t{ encoding: \"utf8\" },\n\t\t\t);\n\t\t}\n\n\t\tif (options.docs) {\n\t\t\tlogStep(\"Generating typedoc documentation\");\n\t\t\tawait generateDocs(\n\t\t\t\tlocation,\n\t\t\t\tpath.join(outputDirectory, `${data.Package}.d.ts`),\n\t\t\t\tpath.join(workspace.path, \"docs\", data.Package),\n\t\t\t\tdata.Package,\n\t\t\t);\n\t\t}\n\n\t\tindex++;\n\t}\n};\n\nconst createNamespace = (parts: string[]) => {\n\tlet code = `var ${parts[0]};`;\n\n\tfor (let index = 0; index < parts.length; index++) {\n\t\tconst path = parts.slice(0, index + 1).join(\".\");\n\n\t\tcode += `\\n(${path} = ${path} || {});`;\n\t}\n\n\treturn code;\n};\n\nconst ensureTsConfig = (location: PackageLocation) => {\n\tconst tsconfigPath = path.join(location.scriptsDir, \"tsconfig.json\");\n\n\tif (!fs.existsSync(tsconfigPath)) {\n\t\tconst content = {};\n\t\tapplyTsConfigOption(content);\n\n\t\tfs.writeFileSync(\n\t\t\ttsconfigPath,\n\t\t\tJSON.stringify(content, undefined, \"\\t\"),\n\t\t\t\"utf8\",\n\t\t);\n\t} else {\n\t\tconst content = JSON.parse(fs.readFileSync(tsconfigPath, \"utf8\"));\n\t\tapplyTsConfigOption(content);\n\t\tfs.writeFileSync(\n\t\t\ttsconfigPath,\n\t\t\tJSON.stringify(content, undefined, \"\\t\"),\n\t\t\t\"utf8\",\n\t\t);\n\t}\n};\n\nconst applyTsConfigOption = (data: {\n\tcompilerOptions?: { target?: string; lib?: string[] };\n}) => {\n\tdata.compilerOptions = data.compilerOptions ?? {};\n\tdata.compilerOptions.target = \"es5\";\n\tdata.compilerOptions.lib = [\"es5\", \"dom\"];\n};\n\nconst sortPackagesByBuildOrder = (\n\tfolders: PackageLocation[],\n): PackageLocation[] => {\n\tconst packages = Array.from(folders).reduce(\n\t\t(\n\t\t\tacc: Record<string, FolderData>,\n\t\t\tlocation,\n\t\t): Record<string, FolderData> => {\n\t\t\tconst data = readPackageNpmManifest(location);\n\n\t\t\tif (data !== undefined) {\n\t\t\t\tacc[data.name] = {\n\t\t\t\t\tdata,\n\t\t\t\t\tlocation,\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tacc[location.path] = {\n\t\t\t\t\tdata: undefined,\n\t\t\t\t\tlocation,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn acc;\n\t\t},\n\t\t{},\n\t);\n\n\tconst packageDependencies = Object.getOwnPropertyNames(packages).reduce(\n\t\t(acc, packageName) => {\n\t\t\tconst packageData = packages[packageName];\n\n\t\t\tif (packageData.data === undefined) {\n\t\t\t\tacc[packageName] = [];\n\t\t\t} else {\n\t\t\t\tacc[packageName] = Object.getOwnPropertyNames({\n\t\t\t\t\t...packageData.data.devDependencies,\n\t\t\t\t\t...packageData.data.dependencies,\n\t\t\t\t\t...packageData.data.peerDependencies,\n\t\t\t\t}).filter((packageName) => packages[packageName] !== undefined);\n\t\t\t}\n\n\t\t\treturn acc;\n\t\t},\n\t\t{},\n\t);\n\n\tconst sortedPackages = toposort(packageDependencies);\n\tconst result: PackageLocation[] = [];\n\n\tfor (const packageName of sortedPackages) {\n\t\tconst location = packages[packageName].location;\n\n\t\tif (readPackageCreatorManifest(location).Package.endsWith(\".Basics\")) {\n\t\t\tresult.unshift(location);\n\t\t} else {\n\t\t\tresult.push(location);\n\t\t}\n\t}\n\n\treturn result;\n};\n\nconst createBannerComment = (banner: BannerOptions) => {\n\tconst bannerParts: string[] = [];\n\n\tif (banner.text) {\n\t\tbannerParts.push(\" * \" + banner.text);\n\t}\n\n\t{\n\t\tconst details: string[] = [];\n\n\t\tif (banner.version) {\n\t\t\tdetails.push(`Version: ${banner.version}`);\n\t\t}\n\t\tif (banner.commit) {\n\t\t\tif (banner.commitDirty) {\n\t\t\t\tdetails.push(`Commit: ${banner.commit} (dirty)`);\n\t\t\t} else {\n\t\t\t\tdetails.push(`Commit: ${banner.commit}`);\n\t\t\t}\n\t\t}\n\t\tif (banner.date) {\n\t\t\tdetails.push(`Date: ${banner.date.toISOString()}`);\n\t\t}\n\n\t\tconst detailsText = details.map((line) => ` * ${line}`).join(\"\\n\");\n\t\tif (detailsText) {\n\t\t\tbannerParts.push(detailsText);\n\t\t}\n\t}\n\n\tconst bannerText = bannerParts.join(\"\\n\\n\");\n\n\tif (bannerText) {\n\t\treturn `/*\n${bannerText}\n*\n* @preserve\t\t\t\n*/`;\n\t}\n\n\treturn undefined;\n};\n"],"names":["logPackageMessage","name","step","index","total","numLength","undefined","toString","length","indexString","padStart","identifierString","padEnd","console","log","tryReadTsConfig","location","config","ts","readConfigFile","path","join","scriptsDir","fs","readFileSync","build","outputDir","compilerOptions","lib","result","convertCompilerOptionsFromJson","options","removeComments","declaration","sourceMap","outFile","target","ScriptTarget","ES5","noEmitOnError","host","createCompilerHost","getCurrentDirectory","js","definitions","writeFile","fileName","data","writeByteOrderMark","endsWith","files","getPackageTypescriptFiles","Error","programOptions","rootNames","program","createProgram","emitResult","emit","allDiagnostics","getPreEmitDiagnostics","emitSkipped","map","createErrorMessage","error","diagnostic","file","flattenDiagnosticMessageText","messageText","line","character","getLineAndCharacterOfPosition","start","message","generateDocs","declarationFile","outFolder","app","typedoc","Application","mediaDir","manifestDir","bootstrap","entryPoints","media","out","tsconfig","skipErrorChecking","setCompilerOptions","setValue","readmePath","glob","sync","absolute","cwd","project","convert","toposort","packages","queue","Object","getOwnPropertyNames","queueEntry","dependencies","dependencyQueued","some","dependency","includes","splice","push","$schema","$id","$comment","title","additionalProperties","type","properties","Id","description","Animations","items","_","Path","$ref","States","Position","Rotation","Scaling","Visibility","Deformation","anyOf","Kinematics","oneOf","LinkedPoints","vec3","X","Y","Z","rotation","Q","W","igxcPath","pattern","param","kinematicChain","GeometryBase","Joints","Name","HeadX","HeadY","HeadZ","Tail","LimitLeft","LimitRight","LimitUp","LimitDown","FollowJointNode","_TargetNodeForFollow","Target","enum","Parent","Tolerance","MaxIterations","__","validateAnimationJson","getAnimationJsonValidation","Ajv","coerceTypes","allErrors","removeAdditional","useDefaults","validateSchema","compile","animationSchema","buildFolders","outDir","clean","rmSync","recursive","workspace","folders","sortedPackages","sortPackagesByBuildOrder","hasTypescript","ensureTsConfig","readPackageCreatorManifest","logStep","Package","outputDirectory","mkdirSync","buildResult","tscBuild","banner","createBannerComment","animations","Map","scriptFilePath","readPackageAnimationList","content","encoding","JSON","parse","err","relativePath","relative","SyntaxError","String","cause","basename","set","stringify","size","scope","Scope","scopeParts","split","createNamespace","writeFileSync","minimize","minifyResult","terser","minify","ecma","minifiedPath","code","docs","parts","slice","tsconfigPath","existsSync","applyTsConfigOption","Array","from","reduce","acc","readPackageNpmManifest","packageDependencies","packageName","packageData","devDependencies","peerDependencies","filter","unshift","bannerParts","text","details","version","commit","commitDirty","date","toISOString","detailsText","bannerText"],"mappings":";;;;;;;;;;;;;;;AAAA,MAAMA,iBAAoB,GAAA,CAACC,IAAMC,EAAAA,IAAAA,EAAMC,OAAOC,KAAQ,GAAA;AAClD,IAAA,MAAMC,YAAYD,KAAUE,KAAAA,SAAAA,GAAYA,YAAYF,KAAMG,CAAAA,QAAQ,GAAGC,MAAM,CAAA;AAC3E,IAAA,MAAMC,cAAcL,KAAUE,KAAAA,SAAAA,IAAaF,QAAQ,CAAI,GAAA,EAAA,GAAK,CAAC,EAAED,KAAAA,CAAMI,QAAQ,EAAGG,CAAAA,QAAQ,CAACL,SAAW,EAAA,GAAA,CAAA,CAAK,CAAC,EAAED,KAAAA,CAAM,CAAC,CAAC,CAAA;IACpH,MAAMO,gBAAAA,GAAmB,CAAC,EAAEF,WAAAA,CAAY,EAAER,IAAKW,CAAAA,MAAM,CAAC,EAAA,CAAA,CAAI,CAAC,CAAA;IAC3DC,OAAQC,CAAAA,GAAG,CAAC,CAAC,EAAEH,iBAAiB,IAAI,EAAET,KAAK,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,IAAI,CAACC,WAAW,EAAA,CAAG,CAAC,CAAA,CAAA;SACjD;AAED,QAAA,MAAMC,WAAcN,GAAAA,OAAAA,CAAQvL,GAAG,CAAC,CAACO,IAAAA,GAAS,CAAC,GAAG,EAAEA,IAAAA,CAAK,CAAC,CAAA,CAAEhD,IAAI,CAAC,IAAA,CAAA,CAAA;AAC7D,QAAA,IAAIsO,WAAa,EAAA;AAChBR,YAAAA,WAAAA,CAAYtI,IAAI,CAAC8I,WAAAA,CAAAA,CAAAA;SACjB;AACF,KAAA;IAEA,MAAMC,UAAAA,GAAaT,WAAY9N,CAAAA,IAAI,CAAC,MAAA,CAAA,CAAA;AAEpC,IAAA,IAAIuO,UAAY,EAAA;AACf,QAAA,OAAO,CAAC;AACV,EAAEA,UAAW,CAAA;;;EAGX,CAAC,CAAA;KACD;IAED,OAAOtP,SAAAA,CAAAA;AACR,CAAA;;;;;;;;;"}
|
|
@@ -5,15 +5,15 @@ import { createWriteStream, createReadStream } from 'fs';
|
|
|
5
5
|
import { pipeline } from 'stream/promises';
|
|
6
6
|
import { exec } from 'child_process';
|
|
7
7
|
import { promisify } from 'util';
|
|
8
|
-
import { r as readPublishedPackageCreatorIndex, d as determineWorkspaceIGLibraries, a as readPublishedPackageNpmManifest, b as readPublishedPackageCreatorManifest } from './dependencies-
|
|
9
|
-
import { P as PACKAGE_FILE, I as INDEX_FILE, p as parseCreatorPackageName, r as readPackageCreatorManifest, w as writePackageCreatorManifest, i as isErrorENOENT, a as readPackageCreatorIndex, b as readWorkspaceNpmManifest, g as getWorkspaceOutputPath, c as readPackageAnimationList, d as isErrorEACCES, e as isErrorEPERM, u as uploadPackageFromStream, f as getPackageReleasesDirectory, h as getExistingPackages, s as startSession, j as closeSession } from './cli-
|
|
10
|
-
import { l as logPackageMessage, b as buildFolders } from './index-
|
|
8
|
+
import { r as readPublishedPackageCreatorIndex, d as determineWorkspaceIGLibraries, a as readPublishedPackageNpmManifest, b as readPublishedPackageCreatorManifest } from './dependencies-7b889e67.mjs';
|
|
9
|
+
import { P as PACKAGE_FILE, I as INDEX_FILE, p as parseCreatorPackageName, r as readPackageCreatorManifest, w as writePackageCreatorManifest, i as isErrorENOENT, a as readPackageCreatorIndex, b as readWorkspaceNpmManifest, g as getWorkspaceOutputPath, c as readPackageAnimationList, d as isErrorEACCES, e as isErrorEPERM, u as uploadPackageFromStream, f as getPackageReleasesDirectory, h as getExistingPackages, s as startSession, j as closeSession } from './cli-4b4eb819.mjs';
|
|
10
|
+
import { l as logPackageMessage, b as buildFolders } from './index-14f27618.mjs';
|
|
11
11
|
import 'write-pkg';
|
|
12
12
|
import 'glob';
|
|
13
13
|
import 'node:path';
|
|
14
14
|
import 'node:fs';
|
|
15
15
|
import 'axios';
|
|
16
|
-
import { g as getVersionFileHandler, p as parseVersionFromString, a as getVersionInformationFromGit, b as getWorkspaceBannerText, c as parseVersionFromNumericVersion, P as PackageVersion } from './versionFile-
|
|
16
|
+
import { g as getVersionFileHandler, p as parseVersionFromString, a as getVersionInformationFromGit, b as getWorkspaceBannerText, c as parseVersionFromNumericVersion, P as PackageVersion } from './versionFile-041c0e79.mjs';
|
|
17
17
|
import JSZip from 'jszip';
|
|
18
18
|
import * as terser from 'terser';
|
|
19
19
|
import 'resolve';
|
|
@@ -50,14 +50,14 @@ const notRuntimeScripts = [
|
|
|
50
50
|
"Evaluator"
|
|
51
51
|
];
|
|
52
52
|
const buildArchiveFromPackage = async (packageLocation, data, binDir)=>{
|
|
53
|
-
const { domain
|
|
53
|
+
const { domain } = parseCreatorPackageName(data);
|
|
54
54
|
const logStep = (step)=>logPackageMessage(data.Package, step);
|
|
55
55
|
const libFilePath = path.join(binDir, `${data.Package}.min.js`);
|
|
56
56
|
const scriptDirectories = [
|
|
57
57
|
packageLocation.path,
|
|
58
58
|
packageLocation.scriptsDir
|
|
59
59
|
];
|
|
60
|
-
if (
|
|
60
|
+
if (data.Package === "IG.GFX.Standard") {
|
|
61
61
|
logStep(`Including Images folder`);
|
|
62
62
|
scriptDirectories.push(path.join(packageLocation.path, "Images"));
|
|
63
63
|
}
|
|
@@ -445,4 +445,4 @@ const createSessionManager = async (params)=>{
|
|
|
445
445
|
};
|
|
446
446
|
|
|
447
447
|
export { releaseFolder };
|
|
448
|
-
//# sourceMappingURL=index-
|
|
448
|
+
//# sourceMappingURL=index-4dd728d6.mjs.map
|