@powerlines/plugin-style-dictionary 0.1.53 → 0.1.54
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/dist/index-BgAdqTbb.d.mts +1 -0
- package/dist/index-CEgs-Dz2.d.cts +1 -0
- package/dist/index.cjs +14 -7
- package/dist/index.d.cts +7 -27
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +15 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +15 -0
- package/dist/index.mjs.map +1 -0
- package/dist/plugin-BTy0EdPI.d.mts +1744 -0
- package/dist/plugin-BTy0EdPI.d.mts.map +1 -0
- package/dist/plugin-Bvn-he2n.mjs +1 -0
- package/dist/plugin-JHLuXCxc.d.cts +1743 -0
- package/dist/plugin-JHLuXCxc.d.cts.map +1 -0
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.d.cts +3 -24
- package/dist/types/index.d.mts +3 -0
- package/dist/types/index.mjs +1 -0
- package/dist/types/plugin.cjs +1 -1
- package/dist/types/plugin.d.cts +2 -24
- package/dist/types/plugin.d.mts +2 -0
- package/dist/types/plugin.mjs +1 -0
- package/dist/types-B7VYa_Pp.mjs +1 -0
- package/dist/types-DHkg7xmX.cjs +0 -0
- package/package.json +42 -24
- package/dist/index-BqespRMS.d.cts +0 -1655
- package/dist/index-BqespRMS.d.ts +0 -1655
- package/dist/index.d.ts +0 -35
- package/dist/index.js +0 -7
- package/dist/types/index.d.ts +0 -24
- package/dist/types/index.js +0 -1
- package/dist/types/plugin.d.ts +0 -24
- /package/dist/{types/plugin.js → plugin-DHXHjv16.cjs} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
Object.defineProperty(exports,`__esModule`,{value:!0});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));require(`./plugin-DHXHjv16.cjs`),require(`./types-DHkg7xmX.cjs`);let c=require(`@storm-software/config-tools/types`),l=require(`@stryke/type-checks/is-function`),u=require(`defu`);u=s(u);let d=require(`@stryke/convert/parse-type-definition`),f=require(`@stryke/type-checks/is-set-string`),p=require(`esbuild`),m=require(`@stryke/helpers/omit`),h=require(`@stryke/path/join-paths`);require(`@stryke/path/replace`);let g=require(`@stryke/string-format/camel-case`);require(`@stryke/type-checks/is-string`),require(`@stryke/convert/to-array`),require(`@stryke/fs/is-file`),require(`@stryke/fs/list-files`),require(`@stryke/hash/murmurhash`),require(`@stryke/helpers/get-unique`),require(`@stryke/path/append`);let _=require(`style-dictionary`);_=s(_);const v={target:`esnext`,platform:`neutral`,format:`esm`,write:!0,minify:!0,sourcemap:!1,bundle:!0,treeShaking:!0,keepNames:!0,splitting:!0,logLevel:`silent`};function y(e){let t=e.config.build.override.inject??e.config.build.inject;return t&&Object.keys(t).length>0&&e.fs.writeSync((0,h.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,e.artifactsPath,`inject-shim.js`),Object.entries(t).map(([e,t])=>{if(t)if(Array.isArray(t)){if((0,g.camelCase)(e)!==e){if(t.length===1)return`
|
|
2
|
+
import ${(0,g.camelCase)(e)} from "${t[0]}";
|
|
3
|
+
export { ${(0,g.camelCase)(e)} as "${e}" }`;if(t.length>1)return`
|
|
4
|
+
import ${t[1]===`*`?`* as ${(0,g.camelCase)(e)}`:`{ ${t[1]} as ${(0,g.camelCase)(e)} }`} from "${t[0]}";
|
|
5
|
+
export { ${(0,g.camelCase)(e)} as "${e}" }`}else if(t.length===1)return`
|
|
6
|
+
import ${e} from "${t[0]}";
|
|
7
|
+
export { ${e} };`;else if(t.length>1)return`
|
|
8
|
+
import ${t[1]===`*`?`* as ${e}`:`{ ${t[1]} as ${e} }`} from "${t[0]}";
|
|
9
|
+
export { ${e} };`}else if((0,g.camelCase)(e)!==e)return`
|
|
10
|
+
import ${(0,g.camelCase)(e)} from "${t[0]}";
|
|
11
|
+
export { ${(0,g.camelCase)(e)} as "${e}" }`;else return`
|
|
12
|
+
import ${e} from "${t}";
|
|
13
|
+
export { ${e} };`;return``}).join(`
|
|
14
|
+
`)),(0,u.default)({alias:e.builtins.reduce((t,n)=>{if(!t[n]){let r=e.fs.ids[n];r&&(t[n]=r)}return t},e.config.build.alias?Array.isArray(e.config.build.alias)?e.config.build.alias.reduce((e,t)=>(e[t.find.toString()]||(e[t.find.toString()]=t.replacement),e),{}):e.config.build.alias:{}),inject:t&&Object.keys(t).length>0?[(0,h.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,e.artifactsPath,`inject-shim.js`)]:void 0},e.config.build.variant===`esbuild`?(0,m.omit)(e.config.build.override,[`alias`,`inject`,`external`,`noExternal`,`skipNodeModulesBundle`,`extensions`]):{},e.config.build.variant===`esbuild`?(0,m.omit)(e.config.build,[`alias`,`inject`,`external`,`noExternal`,`skipNodeModulesBundle`,`extensions`,`variant`,`override`]):{},{mainFields:e.config.build.mainFields,conditions:e.config.build.conditions,define:e.config.build.define,resolveExtensions:e.config.build.extensions,packages:e.config.build.skipNodeModulesBundle?`external`:e.config.build.variant===`esbuild`?e.config.build.packages:void 0,format:Array.isArray(e.config.output.format)?e.config.output.format[0]:e.config.output.format,platform:e.config.build.platform,treeShaking:!!e.config.build?.treeshake||e.config.build?.treeShaking,outdir:e.config.output.buildPath,tsconfig:e.tsconfig.tsconfigFilePath,tsconfigRaw:e.tsconfig.tsconfigJson,minify:e.config.mode!==`development`,metafile:e.config.mode===`development`,sourcemap:e.config.mode===`development`},v)}async function b(e,t,n={}){let r=await e.fs.resolve(t);if(!r||!e.fs.existsSync(r))throw Error(`Module not found: "${t}". Please check the path and try again.`);let i=await(0,p.build)({...y(e),entry:[r],write:!1,sourcemap:!1,splitting:!1,treeShaking:!1,bundle:!0,...n});if(i.errors.length>0)throw Error(`Failed to transpile ${t}: ${i.errors.map(e=>e.text).join(`, `)}`);if(i.warnings.length>0&&e.log(c.LogLevelLabel.WARN,`Warnings while transpiling ${t}: ${i.warnings.map(e=>e.text).join(`, `)}`),!i.outputFiles||i.outputFiles.filter(Boolean).length===0)throw Error(`No output files generated for ${t}. Please check the configuration and try again.`);return i.outputFiles.filter(Boolean)[0]}async function x(e,t,n={}){let r;r=(0,f.isSetString)(t)?(0,d.parseTypeDefinition)(t):t;let i=await b(e,r.file,n),a=await e.resolver.evalModule(i.text,{filename:i.path,forceTranspile:!0}),o=r.name;return o||=`default`,a[o]??a[`__Ω${o}`]}const S=(e={})=>({name:`style-dictionary`,config(){return{styleDictionary:(0,u.default)(e,{log:{verbosity:this.config.logLevel===c.LogLevelLabel.DEBUG||this.config.logLevel===c.LogLevelLabel.TRACE?`verbose`:this.config.logLevel===null?`silent`:void 0}})}},async configResolved(){if(this.styleDictionary=this.config.styleDictionary.instance??new _.default,this.config.styleDictionary.customActions){let e;e=(0,l.isFunction)(this.config.styleDictionary.customActions)?this.config.styleDictionary.customActions:await x(this,this.config.styleDictionary.customActions),Object.entries((0,l.isFunction)(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerAction({...t,name:e})})}if(this.config.styleDictionary.customFileHeaders){let e;e=(0,l.isFunction)(this.config.styleDictionary.customFileHeaders)?this.config.styleDictionary.customFileHeaders:await x(this,this.config.styleDictionary.customFileHeaders),Object.entries((0,l.isFunction)(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerFileHeader({name:e,fileHeader:t})})}if(this.config.styleDictionary.customFilters){let e;e=(0,l.isFunction)(this.config.styleDictionary.customFilters)?this.config.styleDictionary.customFilters:await x(this,this.config.styleDictionary.customFilters),Object.entries((0,l.isFunction)(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerFilter({...t,name:e})})}if(this.config.styleDictionary.customPreprocessors){let e;e=(0,l.isFunction)(this.config.styleDictionary.customPreprocessors)?this.config.styleDictionary.customPreprocessors:await x(this,this.config.styleDictionary.customPreprocessors),Object.entries((0,l.isFunction)(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerPreprocessor({...t,name:e})})}if(this.config.styleDictionary.customParsers){let e;e=(0,l.isFunction)(this.config.styleDictionary.customParsers)?this.config.styleDictionary.customParsers:await x(this,this.config.styleDictionary.customParsers),Object.entries((0,l.isFunction)(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerParser({...t,name:e})})}if(this.config.styleDictionary.customTransforms){let e;e=(0,l.isFunction)(this.config.styleDictionary.customTransforms)?this.config.styleDictionary.customTransforms:await x(this,this.config.styleDictionary.customTransforms),Object.entries((0,l.isFunction)(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerTransform({...t,name:e})})}if(this.config.styleDictionary.customTransformGroups){let e;e=(0,l.isFunction)(this.config.styleDictionary.customTransformGroups)?this.config.styleDictionary.customTransformGroups:await x(this,this.config.styleDictionary.customTransformGroups),Object.entries((0,l.isFunction)(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerTransformGroup({name:e,transforms:t})})}},async prepare(){await this.styleDictionary.buildAllPlatforms({cache:!this.config.skipCache})}});var C=S;exports.default=C,exports.plugin=S;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,28 +1,7 @@
|
|
|
1
|
-
import { S as StyleDictionaryPluginContext, a as StyleDictionaryPluginOptions,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import '@storm-software/config-tools/types';
|
|
6
|
-
import '@storm-software/config/types';
|
|
7
|
-
import '@stryke/types/base';
|
|
8
|
-
import '@stryke/types/file';
|
|
9
|
-
import 'vite';
|
|
10
|
-
import '@stryke/env/get-env-paths';
|
|
11
|
-
import '@stryke/http/fetch';
|
|
12
|
-
import '@stryke/types/package-json';
|
|
13
|
-
import 'jiti';
|
|
14
|
-
import 'magic-string';
|
|
15
|
-
import 'oxc-parser';
|
|
16
|
-
import 'semver';
|
|
17
|
-
import 'ts-morph';
|
|
18
|
-
import 'undici';
|
|
19
|
-
import 'unplugin';
|
|
20
|
-
import '@stryke/fs/resolve';
|
|
21
|
-
import '@stryke/types/tsconfig';
|
|
22
|
-
import 'typescript';
|
|
23
|
-
import '@stryke/types/array';
|
|
24
|
-
import 'style-dictionary';
|
|
25
|
-
import 'style-dictionary/types';
|
|
1
|
+
import { C as __ΩStyleDictionaryPluginEnvironmentConfig, D as Plugin, E as __ΩStyleDictionaryPluginUserConfig, S as __ΩStyleDictionaryPluginContext, T as __ΩStyleDictionaryPluginResolvedConfig, _ as __ΩCustomFormatsBuilder, a as CustomParsersBuilder, b as __ΩCustomTransformGroupsBuilder, c as CustomTransformsBuilder, d as StyleDictionaryPluginOptions, f as StyleDictionaryPluginResolvedConfig, g as __ΩCustomFiltersBuilder, h as __ΩCustomFileHeadersBuilder, i as CustomFormatsBuilder, l as StyleDictionaryPluginContext, m as __ΩCustomActionsBuilder, n as CustomFileHeadersBuilder, o as CustomPreprocessorsBuilder, p as StyleDictionaryPluginUserConfig, r as CustomFiltersBuilder, s as CustomTransformGroupsBuilder, t as CustomActionsBuilder, u as StyleDictionaryPluginEnvironmentConfig, v as __ΩCustomParsersBuilder, w as __ΩStyleDictionaryPluginOptions, x as __ΩCustomTransformsBuilder, y as __ΩCustomPreprocessorsBuilder } from "./plugin-JHLuXCxc.cjs";
|
|
2
|
+
import "./index-CEgs-Dz2.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/index.d.ts
|
|
26
5
|
|
|
27
6
|
/**
|
|
28
7
|
* A Powerlines plugin to integrate style-dictionary for code generation.
|
|
@@ -31,5 +10,6 @@ import 'style-dictionary/types';
|
|
|
31
10
|
* @returns A Powerlines plugin instance.
|
|
32
11
|
*/
|
|
33
12
|
declare const plugin: <TContext extends StyleDictionaryPluginContext = StyleDictionaryPluginContext>(options?: StyleDictionaryPluginOptions) => Plugin<TContext>;
|
|
34
|
-
|
|
35
|
-
export { StyleDictionaryPluginContext, StyleDictionaryPluginOptions, plugin as default, plugin };
|
|
13
|
+
//#endregion
|
|
14
|
+
export { CustomActionsBuilder, CustomFileHeadersBuilder, CustomFiltersBuilder, CustomFormatsBuilder, CustomParsersBuilder, CustomPreprocessorsBuilder, CustomTransformGroupsBuilder, CustomTransformsBuilder, StyleDictionaryPluginContext, StyleDictionaryPluginEnvironmentConfig, StyleDictionaryPluginOptions, StyleDictionaryPluginResolvedConfig, StyleDictionaryPluginUserConfig, __ΩCustomActionsBuilder, __ΩCustomFileHeadersBuilder, __ΩCustomFiltersBuilder, __ΩCustomFormatsBuilder, __ΩCustomParsersBuilder, __ΩCustomPreprocessorsBuilder, __ΩCustomTransformGroupsBuilder, __ΩCustomTransformsBuilder, __ΩStyleDictionaryPluginContext, __ΩStyleDictionaryPluginEnvironmentConfig, __ΩStyleDictionaryPluginOptions, __ΩStyleDictionaryPluginResolvedConfig, __ΩStyleDictionaryPluginUserConfig, plugin as default, plugin };
|
|
15
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;AA6CA;;;;;AAIG,cAJU,MAIV,EAAA,CAAA,iBAHgB,4BAGhB,GAH+C,4BAG/C,CAAA,CAAA,OAAA,CAAA,EADQ,4BACR,EAAA,GAAA,MAAA,CAAO,QAAP,CAAA"}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { C as __ΩStyleDictionaryPluginEnvironmentConfig, D as Plugin, E as __ΩStyleDictionaryPluginUserConfig, S as __ΩStyleDictionaryPluginContext, T as __ΩStyleDictionaryPluginResolvedConfig, _ as __ΩCustomFormatsBuilder, a as CustomParsersBuilder, b as __ΩCustomTransformGroupsBuilder, c as CustomTransformsBuilder, d as StyleDictionaryPluginOptions, f as StyleDictionaryPluginResolvedConfig, g as __ΩCustomFiltersBuilder, h as __ΩCustomFileHeadersBuilder, i as CustomFormatsBuilder, l as StyleDictionaryPluginContext, m as __ΩCustomActionsBuilder, n as CustomFileHeadersBuilder, o as CustomPreprocessorsBuilder, p as StyleDictionaryPluginUserConfig, r as CustomFiltersBuilder, s as CustomTransformGroupsBuilder, t as CustomActionsBuilder, u as StyleDictionaryPluginEnvironmentConfig, v as __ΩCustomParsersBuilder, w as __ΩStyleDictionaryPluginOptions, x as __ΩCustomTransformsBuilder, y as __ΩCustomPreprocessorsBuilder } from "./plugin-BTy0EdPI.mjs";
|
|
2
|
+
import "./index-BgAdqTbb.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/index.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A Powerlines plugin to integrate style-dictionary for code generation.
|
|
8
|
+
*
|
|
9
|
+
* @param options - The plugin options.
|
|
10
|
+
* @returns A Powerlines plugin instance.
|
|
11
|
+
*/
|
|
12
|
+
declare const plugin: <TContext extends StyleDictionaryPluginContext = StyleDictionaryPluginContext>(options?: StyleDictionaryPluginOptions) => Plugin<TContext>;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { CustomActionsBuilder, CustomFileHeadersBuilder, CustomFiltersBuilder, CustomFormatsBuilder, CustomParsersBuilder, CustomPreprocessorsBuilder, CustomTransformGroupsBuilder, CustomTransformsBuilder, StyleDictionaryPluginContext, StyleDictionaryPluginEnvironmentConfig, StyleDictionaryPluginOptions, StyleDictionaryPluginResolvedConfig, StyleDictionaryPluginUserConfig, __ΩCustomActionsBuilder, __ΩCustomFileHeadersBuilder, __ΩCustomFiltersBuilder, __ΩCustomFormatsBuilder, __ΩCustomParsersBuilder, __ΩCustomPreprocessorsBuilder, __ΩCustomTransformGroupsBuilder, __ΩCustomTransformsBuilder, __ΩStyleDictionaryPluginContext, __ΩStyleDictionaryPluginEnvironmentConfig, __ΩStyleDictionaryPluginOptions, __ΩStyleDictionaryPluginResolvedConfig, __ΩStyleDictionaryPluginUserConfig, plugin as default, plugin };
|
|
15
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;AA6CA;;;;;AAIG,cAJU,MAIV,EAAA,CAAA,iBAHgB,4BAGhB,GAH+C,4BAG/C,CAAA,CAAA,OAAA,CAAA,EADQ,4BACR,EAAA,GAAA,MAAA,CAAO,QAAP,CAAA"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import"./plugin-Bvn-he2n.mjs";import"./types-B7VYa_Pp.mjs";import{LogLevelLabel as e}from"@storm-software/config-tools/types";import{isFunction as t}from"@stryke/type-checks/is-function";import n from"defu";import{parseTypeDefinition as r}from"@stryke/convert/parse-type-definition";import{isSetString as i}from"@stryke/type-checks/is-set-string";import{build as a}from"esbuild";import{omit as o}from"@stryke/helpers/omit";import{joinPaths as s}from"@stryke/path/join-paths";import"@stryke/path/replace";import{camelCase as c}from"@stryke/string-format/camel-case";import"@stryke/type-checks/is-string";import"@stryke/convert/to-array";import"@stryke/fs/is-file";import"@stryke/fs/list-files";import"@stryke/hash/murmurhash";import"@stryke/helpers/get-unique";import"@stryke/path/append";import l from"style-dictionary";const u={target:`esnext`,platform:`neutral`,format:`esm`,write:!0,minify:!0,sourcemap:!1,bundle:!0,treeShaking:!0,keepNames:!0,splitting:!0,logLevel:`silent`};function d(e){let t=e.config.build.override.inject??e.config.build.inject;return t&&Object.keys(t).length>0&&e.fs.writeSync(s(e.workspaceConfig.workspaceRoot,e.config.projectRoot,e.artifactsPath,`inject-shim.js`),Object.entries(t).map(([e,t])=>{if(t)if(Array.isArray(t)){if(c(e)!==e){if(t.length===1)return`
|
|
2
|
+
import ${c(e)} from "${t[0]}";
|
|
3
|
+
export { ${c(e)} as "${e}" }`;if(t.length>1)return`
|
|
4
|
+
import ${t[1]===`*`?`* as ${c(e)}`:`{ ${t[1]} as ${c(e)} }`} from "${t[0]}";
|
|
5
|
+
export { ${c(e)} as "${e}" }`}else if(t.length===1)return`
|
|
6
|
+
import ${e} from "${t[0]}";
|
|
7
|
+
export { ${e} };`;else if(t.length>1)return`
|
|
8
|
+
import ${t[1]===`*`?`* as ${e}`:`{ ${t[1]} as ${e} }`} from "${t[0]}";
|
|
9
|
+
export { ${e} };`}else if(c(e)!==e)return`
|
|
10
|
+
import ${c(e)} from "${t[0]}";
|
|
11
|
+
export { ${c(e)} as "${e}" }`;else return`
|
|
12
|
+
import ${e} from "${t}";
|
|
13
|
+
export { ${e} };`;return``}).join(`
|
|
14
|
+
`)),n({alias:e.builtins.reduce((t,n)=>{if(!t[n]){let r=e.fs.ids[n];r&&(t[n]=r)}return t},e.config.build.alias?Array.isArray(e.config.build.alias)?e.config.build.alias.reduce((e,t)=>(e[t.find.toString()]||(e[t.find.toString()]=t.replacement),e),{}):e.config.build.alias:{}),inject:t&&Object.keys(t).length>0?[s(e.workspaceConfig.workspaceRoot,e.config.projectRoot,e.artifactsPath,`inject-shim.js`)]:void 0},e.config.build.variant===`esbuild`?o(e.config.build.override,[`alias`,`inject`,`external`,`noExternal`,`skipNodeModulesBundle`,`extensions`]):{},e.config.build.variant===`esbuild`?o(e.config.build,[`alias`,`inject`,`external`,`noExternal`,`skipNodeModulesBundle`,`extensions`,`variant`,`override`]):{},{mainFields:e.config.build.mainFields,conditions:e.config.build.conditions,define:e.config.build.define,resolveExtensions:e.config.build.extensions,packages:e.config.build.skipNodeModulesBundle?`external`:e.config.build.variant===`esbuild`?e.config.build.packages:void 0,format:Array.isArray(e.config.output.format)?e.config.output.format[0]:e.config.output.format,platform:e.config.build.platform,treeShaking:!!e.config.build?.treeshake||e.config.build?.treeShaking,outdir:e.config.output.buildPath,tsconfig:e.tsconfig.tsconfigFilePath,tsconfigRaw:e.tsconfig.tsconfigJson,minify:e.config.mode!==`development`,metafile:e.config.mode===`development`,sourcemap:e.config.mode===`development`},u)}async function f(t,n,r={}){let i=await t.fs.resolve(n);if(!i||!t.fs.existsSync(i))throw Error(`Module not found: "${n}". Please check the path and try again.`);let o=await a({...d(t),entry:[i],write:!1,sourcemap:!1,splitting:!1,treeShaking:!1,bundle:!0,...r});if(o.errors.length>0)throw Error(`Failed to transpile ${n}: ${o.errors.map(e=>e.text).join(`, `)}`);if(o.warnings.length>0&&t.log(e.WARN,`Warnings while transpiling ${n}: ${o.warnings.map(e=>e.text).join(`, `)}`),!o.outputFiles||o.outputFiles.filter(Boolean).length===0)throw Error(`No output files generated for ${n}. Please check the configuration and try again.`);return o.outputFiles.filter(Boolean)[0]}async function p(e,t,n={}){let a;a=i(t)?r(t):t;let o=await f(e,a.file,n),s=await e.resolver.evalModule(o.text,{filename:o.path,forceTranspile:!0}),c=a.name;return c||=`default`,s[c]??s[`__Ω${c}`]}const m=(r={})=>({name:`style-dictionary`,config(){return{styleDictionary:n(r,{log:{verbosity:this.config.logLevel===e.DEBUG||this.config.logLevel===e.TRACE?`verbose`:this.config.logLevel===null?`silent`:void 0}})}},async configResolved(){if(this.styleDictionary=this.config.styleDictionary.instance??new l,this.config.styleDictionary.customActions){let e;e=t(this.config.styleDictionary.customActions)?this.config.styleDictionary.customActions:await p(this,this.config.styleDictionary.customActions),Object.entries(t(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerAction({...t,name:e})})}if(this.config.styleDictionary.customFileHeaders){let e;e=t(this.config.styleDictionary.customFileHeaders)?this.config.styleDictionary.customFileHeaders:await p(this,this.config.styleDictionary.customFileHeaders),Object.entries(t(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerFileHeader({name:e,fileHeader:t})})}if(this.config.styleDictionary.customFilters){let e;e=t(this.config.styleDictionary.customFilters)?this.config.styleDictionary.customFilters:await p(this,this.config.styleDictionary.customFilters),Object.entries(t(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerFilter({...t,name:e})})}if(this.config.styleDictionary.customPreprocessors){let e;e=t(this.config.styleDictionary.customPreprocessors)?this.config.styleDictionary.customPreprocessors:await p(this,this.config.styleDictionary.customPreprocessors),Object.entries(t(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerPreprocessor({...t,name:e})})}if(this.config.styleDictionary.customParsers){let e;e=t(this.config.styleDictionary.customParsers)?this.config.styleDictionary.customParsers:await p(this,this.config.styleDictionary.customParsers),Object.entries(t(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerParser({...t,name:e})})}if(this.config.styleDictionary.customTransforms){let e;e=t(this.config.styleDictionary.customTransforms)?this.config.styleDictionary.customTransforms:await p(this,this.config.styleDictionary.customTransforms),Object.entries(t(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerTransform({...t,name:e})})}if(this.config.styleDictionary.customTransformGroups){let e;e=t(this.config.styleDictionary.customTransformGroups)?this.config.styleDictionary.customTransformGroups:await p(this,this.config.styleDictionary.customTransformGroups),Object.entries(t(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerTransformGroup({name:e,transforms:t})})}},async prepare(){await this.styleDictionary.buildAllPlatforms({cache:!this.config.skipCache})}});var h=m;export{h as default,m as plugin};
|
|
15
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["DEFAULT_ESBUILD_CONFIG: Partial<ESBuildResolvedBuildConfig>","typeDefinition!: TypeDefinition","builder!: CustomActionsBuilder","builder!: CustomFileHeadersBuilder","builder!: CustomFiltersBuilder","builder!: CustomPreprocessorsBuilder","builder!: CustomParsersBuilder","builder!: CustomTransformsBuilder","builder!: CustomTransformGroupsBuilder"],"sources":["../../powerlines/src/lib/build/esbuild.ts","../../powerlines/src/lib/utilities/bundle.ts","../../powerlines/src/lib/utilities/resolve.ts","../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { omit } from \"@stryke/helpers/omit\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { replaceExtension, replacePath } from \"@stryke/path/replace\";\nimport { camelCase } from \"@stryke/string-format/camel-case\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport defu from \"defu\";\nimport { BuildOptions, Format, LogLevel, Platform } from \"esbuild\";\nimport {\n ESBuildBuildConfig,\n ESBuildResolvedBuildConfig,\n TsupBuildConfig\n} from \"../../types/build\";\nimport { Context } from \"../../types/context\";\nimport type { ResolvedEntryTypeDefinition } from \"../../types/resolved\";\nimport { resolveEntryInputFile, resolveEntryOutput } from \"../entry\";\n\n// const resolverPlugin = (\n// context: Context,\n// options: Pick<\n// BuildResolvedConfig,\n// \"external\" | \"noExternal\" | \"skipNodeModulesBundle\"\n// > = {}\n// ): Plugin => {\n// return {\n// name: \"powerlines:resolver\",\n// setup(build) {\n// const skipNodeModulesBundle =\n// options.skipNodeModulesBundle ??\n// context.config.build.skipNodeModulesBundle;\n// const external = options.external ?? context.config.build.external ?? [];\n// const noExternal =\n// options.noExternal ?? context.config.build.noExternal ?? [];\n// const resolvePatterns = skipNodeModulesBundle\n// ? tsconfigPathsToRegExp(context.tsconfig.options.paths ?? [])\n// : [];\n\n// const handle = async (args: OnResolveArgs) => {\n// const result = await handleResolveId(\n// context,\n// {\n// id: args.path,\n// importer: args.importer,\n// options: {\n// isEntry: false\n// }\n// },\n// {\n// skipNodeModulesBundle,\n// external,\n// noExternal,\n// resolvePatterns\n// }\n// );\n// if (!result) {\n// return;\n// }\n\n// return {\n// path: result?.id,\n// external: result?.external\n// };\n// };\n\n// build.onResolve({ filter: /.*/ }, handle);\n// build.onResolve({ filter: /^storm:/ }, handle);\n// }\n// };\n// };\n\nexport const DEFAULT_ESBUILD_CONFIG: Partial<ESBuildResolvedBuildConfig> = {\n target: \"esnext\",\n platform: \"neutral\" as Platform,\n format: \"esm\" as Format,\n write: true,\n minify: true,\n sourcemap: false,\n bundle: true,\n treeShaking: true,\n keepNames: true,\n splitting: true,\n logLevel: \"silent\" as LogLevel\n};\n\n/**\n * Resolves the entry options for esbuild.\n *\n * @param context - The build context.\n * @param entryPoints - The entry points to resolve.\n * @returns The resolved entry options.\n */\nexport function resolveESBuildEntry(\n context: Context,\n entryPoints: ResolvedEntryTypeDefinition[] | string[] = []\n): ESBuildResolvedBuildConfig[\"entryPoints\"] {\n return entryPoints.reduce(\n (ret, entry) => {\n if (isString(entry)) {\n ret[\n replaceExtension(\n replacePath(\n entry,\n context.config.sourceRoot || context.config.projectRoot\n )\n )\n ] = replacePath(\n entry,\n context.config.sourceRoot || context.config.projectRoot\n );\n } else {\n ret[entry.output || resolveEntryOutput(context, entry.input || entry)] =\n resolveEntryInputFile(context, entry.input || entry);\n }\n\n return ret;\n },\n {} as Record<string, string>\n );\n}\n\n/**\n * Resolves the esbuild options.\n *\n * @param context - The build context.\n * @returns The resolved esbuild options.\n */\nexport function extractESBuildConfig(context: Context): BuildOptions {\n const inject =\n context.config.build.override.inject ?? context.config.build.inject;\n if (inject && Object.keys(inject).length > 0) {\n context.fs.writeSync(\n joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n context.artifactsPath,\n \"inject-shim.js\"\n ),\n Object.entries(inject)\n .map(([key, value]) => {\n if (value) {\n if (Array.isArray(value)) {\n if (camelCase(key) !== key) {\n if (value.length === 1) {\n return `\nimport ${camelCase(key)} from \"${value[0]}\";\nexport { ${camelCase(key)} as \"${key}\" }`;\n } else if (value.length > 1) {\n return `\nimport ${value[1] === \"*\" ? `* as ${camelCase(key)}` : `{ ${value[1]} as ${camelCase(key)} }`} from \"${value[0]}\";\nexport { ${camelCase(key)} as \"${key}\" }`;\n }\n } else if (value.length === 1) {\n return `\nimport ${key} from \"${value[0]}\";\nexport { ${key} };`;\n } else if (value.length > 1) {\n return `\nimport ${value[1] === \"*\" ? `* as ${key}` : `{ ${value[1]} as ${key} }`} from \"${value[0]}\";\nexport { ${key} };`;\n }\n } else if (camelCase(key) !== key) {\n return `\nimport ${camelCase(key)} from \"${value[0]}\";\nexport { ${camelCase(key)} as \"${key}\" }`;\n } else {\n return `\nimport ${key} from \"${value}\";\nexport { ${key} };`;\n }\n }\n\n return \"\";\n })\n .join(\"\\n\")\n );\n }\n\n return defu(\n {\n alias: context.builtins.reduce(\n (ret, id) => {\n if (!ret[id]) {\n const path = context.fs.ids[id];\n if (path) {\n ret[id] = path;\n }\n }\n\n return ret;\n },\n context.config.build.alias\n ? Array.isArray(context.config.build.alias)\n ? context.config.build.alias.reduce(\n (ret, alias) => {\n if (!ret[alias.find.toString()]) {\n ret[alias.find.toString()] = alias.replacement;\n }\n\n return ret;\n },\n {} as Record<string, string>\n )\n : context.config.build.alias\n : {}\n ),\n inject:\n inject && Object.keys(inject).length > 0\n ? [\n joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n context.artifactsPath,\n \"inject-shim.js\"\n )\n ]\n : undefined\n },\n context.config.build.variant === \"esbuild\"\n ? (omit(context.config.build.override, [\n \"alias\",\n \"inject\",\n \"external\",\n \"noExternal\",\n \"skipNodeModulesBundle\",\n \"extensions\"\n ]) as BuildOptions)\n : {},\n context.config.build.variant === \"esbuild\"\n ? (omit(context.config.build, [\n \"alias\",\n \"inject\",\n \"external\",\n \"noExternal\",\n \"skipNodeModulesBundle\",\n \"extensions\",\n \"variant\",\n \"override\"\n ]) as BuildOptions)\n : {},\n {\n mainFields: context.config.build.mainFields,\n conditions: context.config.build.conditions,\n define: context.config.build.define,\n resolveExtensions: context.config.build.extensions,\n packages: context.config.build.skipNodeModulesBundle\n ? \"external\"\n : context.config.build.variant === \"esbuild\"\n ? (context.config.build as ESBuildBuildConfig).packages\n : undefined,\n format: (Array.isArray(context.config.output.format)\n ? context.config.output.format[0]\n : context.config.output.format) as Format,\n platform: context.config.build.platform,\n treeShaking:\n Boolean((context.config.build as TsupBuildConfig)?.treeshake) ||\n (context.config.build as ESBuildBuildConfig)?.treeShaking,\n outdir: context.config.output.buildPath,\n tsconfig: context.tsconfig.tsconfigFilePath,\n tsconfigRaw: context.tsconfig.tsconfigJson,\n minify: context.config.mode !== \"development\",\n metafile: context.config.mode === \"development\",\n sourcemap: context.config.mode === \"development\"\n },\n DEFAULT_ESBUILD_CONFIG\n ) as BuildOptions;\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport { build, BuildOptions, OutputFile } from \"esbuild\";\nimport { ESBuildResolvedBuildConfig } from \"../../types/build\";\nimport { Context } from \"../../types/context\";\nimport { extractESBuildConfig } from \"../build/esbuild\";\n\n/**\n * Bundle a type definition to a module.\n *\n * @param context - The context object containing the environment paths.\n * @param file - The file path to bundle.\n * @param overrides - Optional overrides for the ESBuild configuration.\n * @returns A promise that resolves to the bundled module.\n */\nexport async function bundle(\n context: Context,\n file: string,\n overrides: Partial<ESBuildResolvedBuildConfig> = {}\n): Promise<OutputFile> {\n const path = await context.fs.resolve(file);\n if (!path || !context.fs.existsSync(path)) {\n throw new Error(\n `Module not found: \"${file}\". Please check the path and try again.`\n );\n }\n\n const result = await build({\n ...extractESBuildConfig(context),\n entry: [path],\n write: false,\n sourcemap: false,\n splitting: false,\n treeShaking: false,\n bundle: true,\n ...overrides\n } as BuildOptions);\n if (result.errors.length > 0) {\n throw new Error(\n `Failed to transpile ${file}: ${result.errors\n .map(error => error.text)\n .join(\", \")}`\n );\n }\n if (result.warnings.length > 0) {\n context.log(\n LogLevelLabel.WARN,\n `Warnings while transpiling ${file}: ${result.warnings\n .map(warning => warning.text)\n .join(\", \")}`\n );\n }\n if (!result.outputFiles || result.outputFiles.filter(Boolean).length === 0) {\n throw new Error(\n `No output files generated for ${\n file\n }. Please check the configuration and try again.`\n );\n }\n\n return result.outputFiles.filter(Boolean)[0]!;\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { parseTypeDefinition } from \"@stryke/convert/parse-type-definition\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport {\n TypeDefinition,\n TypeDefinitionParameter\n} from \"@stryke/types/configuration\";\nimport { ESBuildResolvedBuildConfig } from \"../../types/build\";\nimport { Context } from \"../../types/context\";\nimport { bundle } from \"./bundle\";\n\n/**\n * Compiles a type definition to a module.\n *\n * @param context - The context object containing the environment paths.\n * @param type - The type definition to compile. This can be either a string or a {@link TypeDefinition} object.\n * @param overrides - Optional overrides for the ESBuild configuration.\n * @returns A promise that resolves to the compiled module.\n */\nexport async function resolve<TResult = any>(\n context: Context,\n type: TypeDefinitionParameter,\n overrides: Partial<ESBuildResolvedBuildConfig> = {}\n): Promise<TResult> {\n let typeDefinition!: TypeDefinition;\n if (isSetString(type)) {\n typeDefinition = parseTypeDefinition(type) as TypeDefinition;\n } else {\n typeDefinition = type;\n }\n\n const result = await bundle(context, typeDefinition.file, overrides);\n\n const resolved = (await context.resolver.evalModule(result.text, {\n filename: result.path,\n forceTranspile: true\n })) as Record<string, any>;\n\n let exportName = typeDefinition.name;\n if (!exportName) {\n exportName = \"default\";\n }\n\n return resolved[exportName] ?? resolved[`__Ω${exportName}`];\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport defu from \"defu\";\nimport { resolve } from \"powerlines/lib/utilities/resolve\";\nimport { Plugin } from \"powerlines/types/plugin\";\nimport StyleDictionary from \"style-dictionary\";\nimport {\n CustomActionsBuilder,\n CustomFileHeadersBuilder,\n CustomFiltersBuilder,\n CustomParsersBuilder,\n CustomPreprocessorsBuilder,\n CustomTransformGroupsBuilder,\n CustomTransformsBuilder,\n StyleDictionaryPluginContext,\n StyleDictionaryPluginOptions,\n StyleDictionaryPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\n/**\n * A Powerlines plugin to integrate style-dictionary for code generation.\n *\n * @param options - The plugin options.\n * @returns A Powerlines plugin instance.\n */\nexport const plugin = <\n TContext extends StyleDictionaryPluginContext = StyleDictionaryPluginContext\n>(\n options: StyleDictionaryPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"style-dictionary\",\n config() {\n return {\n styleDictionary: defu(options, {\n log: {\n verbosity:\n this.config.logLevel === LogLevelLabel.DEBUG ||\n this.config.logLevel === LogLevelLabel.TRACE\n ? \"verbose\"\n : this.config.logLevel === null\n ? \"silent\"\n : undefined\n }\n })\n } as Partial<StyleDictionaryPluginUserConfig>;\n },\n async configResolved() {\n this.styleDictionary =\n this.config.styleDictionary.instance ?? new StyleDictionary();\n\n if (this.config.styleDictionary.customActions) {\n let builder!: CustomActionsBuilder;\n if (isFunction(this.config.styleDictionary.customActions)) {\n builder = this.config.styleDictionary.customActions;\n } else {\n builder = await resolve<CustomActionsBuilder>(\n this,\n this.config.styleDictionary.customActions\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, action]) => {\n this.styleDictionary.registerAction({\n ...action,\n name\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customFileHeaders) {\n let builder!: CustomFileHeadersBuilder;\n if (isFunction(this.config.styleDictionary.customFileHeaders)) {\n builder = this.config.styleDictionary.customFileHeaders;\n } else {\n builder = await resolve<CustomFileHeadersBuilder>(\n this,\n this.config.styleDictionary.customFileHeaders\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, fileHeader]) => {\n this.styleDictionary.registerFileHeader({\n name,\n fileHeader\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customFilters) {\n let builder!: CustomFiltersBuilder;\n if (isFunction(this.config.styleDictionary.customFilters)) {\n builder = this.config.styleDictionary.customFilters;\n } else {\n builder = await resolve<CustomFiltersBuilder>(\n this,\n this.config.styleDictionary.customFilters\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, filter]) => {\n this.styleDictionary.registerFilter({\n ...filter,\n name\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customPreprocessors) {\n let builder!: CustomPreprocessorsBuilder;\n if (isFunction(this.config.styleDictionary.customPreprocessors)) {\n builder = this.config.styleDictionary.customPreprocessors;\n } else {\n builder = await resolve<CustomPreprocessorsBuilder>(\n this,\n this.config.styleDictionary.customPreprocessors\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, preprocessor]) => {\n this.styleDictionary.registerPreprocessor({\n ...preprocessor,\n name\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customParsers) {\n let builder!: CustomParsersBuilder;\n if (isFunction(this.config.styleDictionary.customParsers)) {\n builder = this.config.styleDictionary.customParsers;\n } else {\n builder = await resolve<CustomParsersBuilder>(\n this,\n this.config.styleDictionary.customParsers\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, parser]) => {\n this.styleDictionary.registerParser({\n ...parser,\n name\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customTransforms) {\n let builder!: CustomTransformsBuilder;\n if (isFunction(this.config.styleDictionary.customTransforms)) {\n builder = this.config.styleDictionary.customTransforms;\n } else {\n builder = await resolve<CustomTransformsBuilder>(\n this,\n this.config.styleDictionary.customTransforms\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, transform]) => {\n this.styleDictionary.registerTransform({\n ...transform,\n name\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customTransformGroups) {\n let builder!: CustomTransformGroupsBuilder;\n if (isFunction(this.config.styleDictionary.customTransformGroups)) {\n builder = this.config.styleDictionary.customTransformGroups;\n } else {\n builder = await resolve<CustomTransformGroupsBuilder>(\n this,\n this.config.styleDictionary.customTransformGroups\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, transformGroup]) => {\n this.styleDictionary.registerTransformGroup({\n name,\n transforms: transformGroup\n });\n }\n );\n }\n },\n async prepare() {\n await this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