@shockpkg/ria-packager
Version:
Package for creating Adobe AIR packages
1 lines • 20.4 kB
Source Map (JSON)
{"version":3,"file":"bundle.mjs","names":["DOMParser","Packager","childTags","el","name","childNodes","r","length","i","child","tagName","push","tagPath","add","e","parentNode","reverse","join","PackagerBundle","sdkPath","_applicationInfoId","_applicationInfoVersionNumber","_applicationInfoFilename","_applicationInfoCopyright","_applicationInfoIcon","_applicationInfoFileTypes","_applicationInfoSupportedLanguages","_applicationInfoRequestedDisplayResolution","_applicationInfoArchitecture","constructor","path","mimetype","signed","_applicationInfoInit","applicationData","doc","parseFromString","TextDecoder","decode","root","documentElement","childTag","tags","Error","childTagReq","tag","childTagValue","textContent","childTagReqValue","childTagReqValued","readIcons","image16x16","image29x29","image32x32","image36x36","image48x48","image50x50","image57x57","image58x58","image72x72","image96x96","image100x100","image114x114","image128x128","image144x144","image512x512","image732x412","image1024x1024","iconTag","fileTypesTag","fileTypes","Map","fileTypeTag","extension","has","contentType","description","icon","set","initialWindowTag","architectureTags","getElementsByTagName","_getId","_getVersionNumber","_getFilename","_getCopyright","_getIcon","_getFileTypes","_applicationInfoClear"],"sources":["../../src/packager/bundle.ts"],"sourcesContent":["import {DOMParser, type Element} from '@xmldom/xmldom';\n\nimport {Packager} from '../packager.ts';\n\n/**\n * Get child tags for an element.\n *\n * @param el Element to get the children of.\n * @param name Child tag name or null.\n * @returns Tag list.\n */\nconst childTags = (el: Readonly<Element>, name: string | null = null) => {\n\tconst {childNodes} = el;\n\tconst r: Element[] = [];\n\tconst {length} = childNodes;\n\tfor (let i = 0; i < length; i++) {\n\t\tconst child = childNodes[i] as Element;\n\t\tconst {tagName} = child;\n\t\tif (!tagName || (name && tagName !== name)) {\n\t\t\tcontinue;\n\t\t}\n\t\tr.push(child);\n\t}\n\treturn r;\n};\n\n/**\n * Get path of tag.\n *\n * @param el Element to get the children of.\n * @param add Additional path.\n * @returns Tag path.\n */\nconst tagPath = (el: Readonly<Element>, add: string | null = null) => {\n\tconst r = add === null ? [el.tagName] : [add, el.tagName];\n\tfor (let e = el.parentNode; e; e = e.parentNode) {\n\t\tconst {tagName} = e as Element;\n\t\tif (!tagName) {\n\t\t\tbreak;\n\t\t}\n\t\tr.push(tagName);\n\t}\n\treturn r.reverse().join('.');\n};\n\nexport interface IIcon {\n\timage16x16: string | null;\n\timage29x29: string | null;\n\timage32x32: string | null;\n\timage36x36: string | null;\n\timage48x48: string | null;\n\timage50x50: string | null;\n\timage57x57: string | null;\n\timage58x58: string | null;\n\timage72x72: string | null;\n\timage96x96: string | null;\n\timage100x100: string | null;\n\timage114x114: string | null;\n\timage128x128: string | null;\n\timage144x144: string | null;\n\timage512x512: string | null;\n\timage732x412: string | null;\n\timage1024x1024: string | null;\n}\n\nexport interface IFileTypeInfo {\n\tname: string;\n\tcontentType: string;\n\tdescription: string | null;\n\ticon: IIcon | null;\n}\n\n/**\n * PackagerBundle object.\n */\nexport abstract class PackagerBundle extends Packager {\n\t/**\n\t * Path to the SDK, an archive or directory.\n\t */\n\tpublic sdkPath: string | null = null;\n\n\t/**\n\t * Application info from the id tag.\n\t */\n\tprotected _applicationInfoId: string | null = null;\n\n\t/**\n\t * Application info from the versionNumber tag.\n\t */\n\tprotected _applicationInfoVersionNumber: string | null = null;\n\n\t/**\n\t * Application info from the filename tag.\n\t */\n\tprotected _applicationInfoFilename: string | null = null;\n\n\t/**\n\t * Application info from the copyright tag.\n\t */\n\tprotected _applicationInfoCopyright: string | null = null;\n\n\t/**\n\t * Application info from the icon tag.\n\t */\n\tprotected _applicationInfoIcon: Readonly<IIcon> | null = null;\n\n\t/**\n\t * Application info from the fileTypes tag.\n\t */\n\tprotected _applicationInfoFileTypes: Map<string, IFileTypeInfo> | null =\n\t\tnull;\n\n\t/**\n\t * Application info from the supportedLanguages tag.\n\t */\n\tprotected _applicationInfoSupportedLanguages: string | null = null;\n\n\t/**\n\t * Application info from the initialWindow.requestedDisplayResolution tag.\n\t */\n\tprotected _applicationInfoRequestedDisplayResolution: string | null = null;\n\n\t/**\n\t * Application info from the architecture tag.\n\t */\n\tprotected _applicationInfoArchitecture: string | null = null;\n\n\t/**\n\t * PackagerBundle constructor.\n\t *\n\t * @param path Output path.\n\t */\n\tconstructor(path: string) {\n\t\tsuper(path);\n\t}\n\n\t/**\n\t * Package mimetype.\n\t *\n\t * @returns Mimetype string.\n\t */\n\tpublic get mimetype() {\n\t\treturn 'application/vnd.adobe.air-application-installer-package+zip';\n\t}\n\n\t/**\n\t * Package signed.\n\t *\n\t * @returns Boolean for if package is signed or not.\n\t */\n\tpublic get signed() {\n\t\treturn true;\n\t}\n\n\t/**\n\t * Init application info from descriptor data.\n\t *\n\t * @param applicationData The application descriptor data.\n\t */\n\tprotected _applicationInfoInit(applicationData: Readonly<Uint8Array>) {\n\t\tsuper._applicationInfoInit(applicationData);\n\n\t\tconst doc = new DOMParser().parseFromString(\n\t\t\tnew TextDecoder().decode(applicationData),\n\t\t\t'text/xml'\n\t\t);\n\t\tconst root = doc.documentElement!;\n\n\t\t/**\n\t\t * Get child tag, optional.\n\t\t *\n\t\t * @param el The element.\n\t\t * @param name Tag name.\n\t\t * @returns The element or null.\n\t\t */\n\t\tconst childTag = (el: Readonly<Element>, name: string) => {\n\t\t\tconst tags = childTags(el, name);\n\t\t\tif (tags.length > 2) {\n\t\t\t\tconst path = tagPath(el, name);\n\t\t\t\tthrow new Error(`Application info allows 1 ${path} tag`);\n\t\t\t}\n\t\t\treturn tags.length ? tags[0] : null;\n\t\t};\n\n\t\t/**\n\t\t * Get child tag, required.\n\t\t *\n\t\t * @param el The element.\n\t\t * @param name Tag name.\n\t\t * @returns The element.\n\t\t */\n\t\tconst childTagReq = (el: Readonly<Element>, name: string) => {\n\t\t\tconst tag = childTag(el, name);\n\t\t\tif (!tag) {\n\t\t\t\tconst path = tagPath(el, name);\n\t\t\t\tthrow new Error(`Application info requires 1 ${path} tag`);\n\t\t\t}\n\t\t\treturn tag;\n\t\t};\n\n\t\t/**\n\t\t * Get child tag value, optional.\n\t\t *\n\t\t * @param el The element.\n\t\t * @param name Tag name.\n\t\t * @returns The value or null.\n\t\t */\n\t\tconst childTagValue = (el: Readonly<Element>, name: string) => {\n\t\t\tconst tag = childTag(el, name);\n\t\t\treturn tag ? tag.textContent || '' : null;\n\t\t};\n\n\t\t/**\n\t\t * Get child tag value, required.\n\t\t *\n\t\t * @param el The element.\n\t\t * @param name Tag name.\n\t\t * @returns The value.\n\t\t */\n\t\tconst childTagReqValue = (el: Readonly<Element>, name: string) => {\n\t\t\tconst {textContent} = childTagReq(el, name);\n\t\t\treturn textContent || '';\n\t\t};\n\n\t\t/**\n\t\t * Get child tag value, required non-empty.\n\t\t *\n\t\t * @param el The element.\n\t\t * @param name Tag name.\n\t\t * @returns The value.\n\t\t */\n\t\tconst childTagReqValued = (el: Readonly<Element>, name: string) => {\n\t\t\tconst r = childTagReqValue(el, name);\n\t\t\tif (!r) {\n\t\t\t\tconst path = tagPath(el, name);\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Application info requires non-empty ${path} tag`\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn r;\n\t\t};\n\n\t\t/**\n\t\t * Read the icon tag.\n\t\t *\n\t\t * @param el The element.\n\t\t * @returns The values.\n\t\t */\n\t\tconst readIcons = (el: Readonly<Element>): IIcon => ({\n\t\t\timage16x16: childTagValue(el, 'image16x16'),\n\t\t\timage29x29: childTagValue(el, 'image29x29'),\n\t\t\timage32x32: childTagValue(el, 'image32x32'),\n\t\t\timage36x36: childTagValue(el, 'image36x36'),\n\t\t\timage48x48: childTagValue(el, 'image48x48'),\n\t\t\timage50x50: childTagValue(el, 'image50x50'),\n\t\t\timage57x57: childTagValue(el, 'image57x57'),\n\t\t\timage58x58: childTagValue(el, 'image58x58'),\n\t\t\timage72x72: childTagValue(el, 'image72x72'),\n\t\t\timage96x96: childTagValue(el, 'image96x96'),\n\t\t\timage100x100: childTagValue(el, 'image100x100'),\n\t\t\timage114x114: childTagValue(el, 'image114x114'),\n\t\t\timage128x128: childTagValue(el, 'image128x128'),\n\t\t\timage144x144: childTagValue(el, 'image144x144'),\n\t\t\timage512x512: childTagValue(el, 'image512x512'),\n\t\t\timage732x412: childTagValue(el, 'image732x412'),\n\t\t\timage1024x1024: childTagValue(el, 'image1024x1024')\n\t\t});\n\n\t\t// The application.id tag.\n\t\tthis._applicationInfoId = childTagReqValued(root, 'id');\n\n\t\t// The application.versionNumber tag.\n\t\tthis._applicationInfoVersionNumber = childTagReqValued(\n\t\t\troot,\n\t\t\t'versionNumber'\n\t\t);\n\n\t\t// The application.filename tag.\n\t\tthis._applicationInfoFilename = childTagReqValued(root, 'filename');\n\n\t\t// The application.copyright tag.\n\t\tthis._applicationInfoCopyright = childTagValue(root, 'copyright');\n\n\t\tconst iconTag = childTag(root, 'icon');\n\t\tthis._applicationInfoIcon = iconTag ? readIcons(iconTag) : null;\n\n\t\t// The application.fileTypes tag.\n\t\tconst fileTypesTag = childTag(root, 'fileTypes');\n\t\tif (fileTypesTag) {\n\t\t\tconst fileTypes = new Map<string, IFileTypeInfo>();\n\t\t\tfor (const fileTypeTag of childTags(fileTypesTag, 'fileType')) {\n\t\t\t\t// The extension is the unique key.\n\t\t\t\tconst extension = childTagReqValued(fileTypeTag, 'extension');\n\t\t\t\tif (fileTypes.has(extension)) {\n\t\t\t\t\tconst path = tagPath(fileTypeTag, 'extension');\n\t\t\t\t\tthrow new Error(`Duplicate ${path}: ${extension}`);\n\t\t\t\t}\n\t\t\t\tconst name = childTagReqValued(fileTypeTag, 'name');\n\t\t\t\tconst contentType = childTagReqValued(\n\t\t\t\t\tfileTypeTag,\n\t\t\t\t\t'contentType'\n\t\t\t\t);\n\t\t\t\tconst description = childTagValue(fileTypeTag, 'description');\n\n\t\t\t\tconst iconTag = childTag(fileTypeTag, 'icon');\n\t\t\t\tconst icon = iconTag ? readIcons(iconTag) : null;\n\n\t\t\t\tfileTypes.set(extension, {\n\t\t\t\t\tname,\n\t\t\t\t\tcontentType,\n\t\t\t\t\tdescription,\n\t\t\t\t\ticon\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis._applicationInfoFileTypes = fileTypes;\n\t\t} else {\n\t\t\tthis._applicationInfoFileTypes = null;\n\t\t}\n\n\t\t// The application.supportedLanguages tag.\n\t\tthis._applicationInfoSupportedLanguages = childTagValue(\n\t\t\troot,\n\t\t\t'supportedLanguages'\n\t\t);\n\n\t\t// The application.initialWindow.requestedDisplayResolution tag.\n\t\tconst initialWindowTag = childTag(root, 'initialWindow');\n\t\tthis._applicationInfoRequestedDisplayResolution = initialWindowTag\n\t\t\t? childTagValue(initialWindowTag, 'requestedDisplayResolution')\n\t\t\t: null;\n\n\t\t// The application.architecture tag (can be anywhere, use first).\n\t\t// eslint-disable-next-line unicorn/prefer-query-selector\n\t\tconst architectureTags = doc.getElementsByTagName('architecture');\n\t\tthis._applicationInfoArchitecture = architectureTags.length\n\t\t\t? architectureTags[0].textContent || null\n\t\t\t: null;\n\t}\n\n\t/**\n\t * Get the application ID.\n\t *\n\t * @returns The ID.\n\t */\n\tprotected _getId() {\n\t\tconst r = this._applicationInfoId;\n\t\tif (r === null) {\n\t\t\tthrow new Error('Internal error');\n\t\t}\n\t\treturn r;\n\t}\n\n\t/**\n\t * Get the application version number.\n\t *\n\t * @returns The version number.\n\t */\n\tprotected _getVersionNumber() {\n\t\tconst r = this._applicationInfoVersionNumber;\n\t\tif (r === null) {\n\t\t\tthrow new Error('Internal error');\n\t\t}\n\t\treturn r;\n\t}\n\n\t/**\n\t * Get the application filename.\n\t *\n\t * @returns The filename.\n\t */\n\tprotected _getFilename() {\n\t\tconst r = this._applicationInfoFilename;\n\t\tif (r === null) {\n\t\t\tthrow new Error('Internal error');\n\t\t}\n\t\treturn r;\n\t}\n\n\t/**\n\t * Get the application copyright if present.\n\t *\n\t * @returns Copyright string or null.\n\t */\n\tprotected _getCopyright() {\n\t\treturn this._applicationInfoCopyright;\n\t}\n\n\t/**\n\t * Get the application icon.\n\t *\n\t * @returns Application icon.\n\t */\n\tprotected _getIcon() {\n\t\treturn this._applicationInfoIcon;\n\t}\n\n\t/**\n\t * The the application file types if present.\n\t *\n\t * @returns File types map or null.\n\t */\n\tprotected _getFileTypes() {\n\t\treturn this._applicationInfoFileTypes;\n\t}\n\n\t/**\n\t * Clear application info from descriptor data.\n\t */\n\tprotected _applicationInfoClear() {\n\t\tsuper._applicationInfoClear();\n\n\t\tthis._applicationInfoId = null;\n\t\tthis._applicationInfoVersionNumber = null;\n\t\tthis._applicationInfoFilename = null;\n\t\tthis._applicationInfoCopyright = null;\n\t\tthis._applicationInfoIcon = null;\n\t\tthis._applicationInfoFileTypes = null;\n\t\tthis._applicationInfoSupportedLanguages = null;\n\t\tthis._applicationInfoRequestedDisplayResolution = null;\n\t\tthis._applicationInfoArchitecture = null;\n\t}\n}\n"],"mappings":"AAAA,SAAQA,SAAS,QAAqB,gBAAgB;AAEtD,SAAQC,QAAQ,QAAO,iBAAgB;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,SAAS,GAAGA,CAACC,EAAqB,EAAEC,IAAmB,GAAG,IAAI,KAAK;EACxE,MAAM;IAACC;EAAU,CAAC,GAAGF,EAAE;EACvB,MAAMG,CAAY,GAAG,EAAE;EACvB,MAAM;IAACC;EAAM,CAAC,GAAGF,UAAU;EAC3B,KAAK,IAAIG,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGD,MAAM,EAAEC,CAAC,EAAE,EAAE;IAChC,MAAMC,KAAK,GAAGJ,UAAU,CAACG,CAAC,CAAY;IACtC,MAAM;MAACE;IAAO,CAAC,GAAGD,KAAK;IACvB,IAAI,CAACC,OAAO,IAAKN,IAAI,IAAIM,OAAO,KAAKN,IAAK,EAAE;MAC3C;IACD;IACAE,CAAC,CAACK,IAAI,CAACF,KAAK,CAAC;EACd;EACA,OAAOH,CAAC;AACT,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMM,OAAO,GAAGA,CAACT,EAAqB,EAAEU,GAAkB,GAAG,IAAI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