@powerlines/plugin-crypto 0.10.80 → 0.10.82

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.
@@ -1,2 +1,2 @@
1
1
  import "./components.mjs";
2
- import { AlloyPluginContext, AlloyPluginResolvedConfig } from "./plugin.mjs";
2
+ import { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig } from "./plugin.mjs";
@@ -1,10 +1,32 @@
1
1
  import { ResolvedConfig } from "../../../powerlines/src/types/resolved.cjs";
2
2
  import { PluginContext } from "../../../powerlines/src/types/context.cjs";
3
3
  import { Children } from "@alloy-js/core/jsx-runtime";
4
+ import { PrintTreeOptions } from "@alloy-js/core";
4
5
 
5
6
  //#region ../plugin-alloy/src/types/plugin.d.ts
6
-
7
- type AlloyPluginResolvedConfig = ResolvedConfig;
7
+ type AlloyPluginOptions = Partial<PrintTreeOptions> & {
8
+ /**
9
+ * If true, the Alloy framework is used to generate Typescript output files.
10
+ *
11
+ * @defaultValue true
12
+ */
13
+ typescript?: boolean;
14
+ /**
15
+ * If true, the Alloy framework is used to generate JSON output files.
16
+ *
17
+ * @defaultValue false
18
+ */
19
+ json?: boolean;
20
+ /**
21
+ * If true, the Alloy framework is used to generate Markdown output files.
22
+ *
23
+ * @defaultValue false
24
+ */
25
+ markdown?: boolean;
26
+ };
27
+ type AlloyPluginResolvedConfig = ResolvedConfig & {
28
+ alloy: AlloyPluginOptions;
29
+ };
8
30
  type AlloyPluginContext<TResolvedConfig extends AlloyPluginResolvedConfig = AlloyPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
9
31
  render: <TContext extends AlloyPluginContext>(this: TContext, children: Children) => Promise<void>;
10
32
  };
@@ -1,13 +1,35 @@
1
1
  import "../../../powerlines/src/types/config.mjs";
2
2
  import { ResolvedConfig } from "../../../powerlines/src/types/resolved.mjs";
3
3
  import { PluginContext } from "../../../powerlines/src/types/context.mjs";
4
- import "../../../plugin-plugin/src/types/plugin.mjs";
4
+ import { PrintTreeOptions } from "@alloy-js/core";
5
5
  import { Children } from "@alloy-js/core/jsx-runtime";
6
6
 
7
7
  //#region ../plugin-alloy/src/types/plugin.d.ts
8
- type AlloyPluginResolvedConfig = ResolvedConfig;
8
+ type AlloyPluginOptions = Partial<PrintTreeOptions> & {
9
+ /**
10
+ * If true, the Alloy framework is used to generate Typescript output files.
11
+ *
12
+ * @defaultValue true
13
+ */
14
+ typescript?: boolean;
15
+ /**
16
+ * If true, the Alloy framework is used to generate JSON output files.
17
+ *
18
+ * @defaultValue false
19
+ */
20
+ json?: boolean;
21
+ /**
22
+ * If true, the Alloy framework is used to generate Markdown output files.
23
+ *
24
+ * @defaultValue false
25
+ */
26
+ markdown?: boolean;
27
+ };
28
+ type AlloyPluginResolvedConfig = ResolvedConfig & {
29
+ alloy: AlloyPluginOptions;
30
+ };
9
31
  type AlloyPluginContext<TResolvedConfig extends AlloyPluginResolvedConfig = AlloyPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
10
32
  render: <TContext extends AlloyPluginContext>(this: TContext, children: Children) => Promise<void>;
11
33
  };
12
34
  //#endregion
13
- export { AlloyPluginContext, AlloyPluginResolvedConfig };
35
+ export { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig };
@@ -1 +1 @@
1
- const e=require(`../../../_virtual/rolldown_runtime.cjs`),t=require(`./source-file-env.cjs`);let n=require(`@stryke/path/join-paths`),r=require(`c12`),i=require(`defu`);i=e.__toESM(i);let a=require(`@stryke/type-checks/is-set-object`),o=require(`@stryke/type-checks/is-set-string`),s=require(`@stryke/env/load-env`),c=require(`@stryke/string-format/kebab-case`);async function l(e,n,r){let a=await(0,s.loadEnv)(r,n);if(e.additionalFiles&&e.additionalFiles?.length>0){let t=await Promise.all(e.additionalFiles.map(async e=>(0,s.loadEnvFile)(e,r)));for(let e of t)a=(0,i.default)(e,a)}return t.removeEnvPrefix(a)}async function u(e,t,a,o,s,c){let[u,d]=await Promise.all([l(e,a,t),(0,r.loadConfig)({cwd:t,name:`storm`,envName:a,defaults:{NAME:s.name?.replace(`@${c.namespace}/`,``),MODE:a,ORG:c.organization},globalRc:!0,packageJson:!0,dotenv:!0,jitiOptions:{fsCache:(0,n.joinPaths)(o,`jiti`),moduleCache:!0}})]);return(0,i.default)(u,d.config,c)}function d(e,t){return(0,i.default)({APP_NAME:(0,c.kebabCase)(e.config.name||e.packageJson.name?.replace(`/${e.workspaceConfig.namespace}`,``)),APP_VERSION:e.packageJson.version,BUILD_ID:e.meta.buildId,BUILD_TIMESTAMP:new Date(e.meta.timestamp).toISOString(),BUILD_CHECKSUM:e.meta.checksum,RELEASE_ID:e.meta.releaseId,RELEASE_TAG:`${(0,c.kebabCase)(e.config.name)}@${e.packageJson.version}`,DEFAULT_LOCALE:e.workspaceConfig.locale,DEFAULT_TIMEZONE:e.workspaceConfig.timezone,LOG_LEVEL:e.config.logLevel,ERROR_URL:e.workspaceConfig.error?.url,ORGANIZATION:(0,o.isSetString)(e.workspaceConfig.organization)?e.workspaceConfig.organization:e.workspaceConfig.organization?.name,PLATFORM:e.config.build.platform,MODE:e.workspaceConfig.mode,DEBUG:e.workspaceConfig.mode===`development`,STACKTRACE:e.workspaceConfig.mode===`development`,ENVIRONMENT:e.environment},(0,a.isSetObject)(e?.env?.types?.env)?e.env.types.env?.getProperties().reduce((e,n)=>(e[n.name]=t[n.name]??n.getDefaultValue(),e),{}):{})}async function f(e,t){let[n,r,a]=await Promise.all([u(t,e.config.projectRoot,e.config.mode,e.cachePath,e.packageJson,e.workspaceConfig),u(t,e.workspaceConfig.workspaceRoot,e.config.mode,e.cachePath,e.packageJson,e.workspaceConfig),u(t,e.envPaths.config,e.config.mode,e.cachePath,e.packageJson,e.workspaceConfig)]);return(0,i.default)(d(e,process.env),n,r,a)}exports.loadEnv=f,exports.loadEnvFromContext=d;
1
+ const e=require(`../../../_virtual/rolldown_runtime.cjs`),t=require(`./source-file-env.cjs`);let n=require(`@stryke/path/join-paths`),r=require(`c12`),i=require(`defu`);i=e.__toESM(i);let a=require(`@stryke/type-checks/is-set-object`),o=require(`@stryke/type-checks/is-set-string`),s=require(`@stryke/string-format/kebab-case`),c=require(`@stryke/env/load-env`);async function l(e,n,r){let a=await(0,c.loadEnv)(r,n);if(e.additionalFiles&&e.additionalFiles?.length>0){let t=await Promise.all(e.additionalFiles.map(async e=>(0,c.loadEnvFile)(e,r)));for(let e of t)a=(0,i.default)(e,a)}return t.removeEnvPrefix(a)}async function u(e,t,a,o,s,c){let[u,d]=await Promise.all([l(e,a,t),(0,r.loadConfig)({cwd:t,name:`storm`,envName:a,defaults:{NAME:s.name?.replace(`@${c.namespace}/`,``),MODE:a,ORG:c.organization},globalRc:!0,packageJson:!0,dotenv:!0,jitiOptions:{fsCache:(0,n.joinPaths)(o,`jiti`),moduleCache:!0}})]);return(0,i.default)(u,d.config,c)}function d(e,t){return(0,i.default)({APP_NAME:(0,s.kebabCase)(e.config.name||e.packageJson.name?.replace(`/${e.workspaceConfig.namespace}`,``)),APP_VERSION:e.packageJson.version,BUILD_ID:e.meta.buildId,BUILD_TIMESTAMP:new Date(e.meta.timestamp).toISOString(),BUILD_CHECKSUM:e.meta.checksum,RELEASE_ID:e.meta.releaseId,RELEASE_TAG:`${(0,s.kebabCase)(e.config.name)}@${e.packageJson.version}`,DEFAULT_LOCALE:e.workspaceConfig.locale,DEFAULT_TIMEZONE:e.workspaceConfig.timezone,LOG_LEVEL:e.config.logLevel,ERROR_URL:e.workspaceConfig.error?.url,ORGANIZATION:(0,o.isSetString)(e.workspaceConfig.organization)?e.workspaceConfig.organization:e.workspaceConfig.organization?.name,PLATFORM:e.config.build.platform,MODE:e.workspaceConfig.mode,DEBUG:e.workspaceConfig.mode===`development`,STACKTRACE:e.workspaceConfig.mode===`development`,ENVIRONMENT:e.environment},(0,a.isSetObject)(e?.env?.types?.env)?e.env.types.env?.getProperties().reduce((e,n)=>(e[n.name]=t[n.name]??n.getDefaultValue(),e),{}):{})}async function f(e,t){let[n,r,a]=await Promise.all([u(t,e.config.projectRoot,e.config.mode,e.cachePath,e.packageJson,e.workspaceConfig),u(t,e.workspaceConfig.workspaceRoot,e.config.mode,e.cachePath,e.packageJson,e.workspaceConfig),u(t,e.envPaths.config,e.config.mode,e.cachePath,e.packageJson,e.workspaceConfig)]);return(0,i.default)(d(e,process.env),n,r,a)}exports.loadEnv=f,exports.loadEnvFromContext=d;
@@ -1 +1 @@
1
- import{removeEnvPrefix as e}from"./source-file-env.mjs";import{joinPaths as t}from"@stryke/path/join-paths";import{loadConfig as n}from"c12";import r from"defu";import{isSetObject as i}from"@stryke/type-checks/is-set-object";import{isSetString as a}from"@stryke/type-checks/is-set-string";import{loadEnv as o,loadEnvFile as s}from"@stryke/env/load-env";import{kebabCase as c}from"@stryke/string-format/kebab-case";async function l(t,n,i){let a=await o(i,n);if(t.additionalFiles&&t.additionalFiles?.length>0){let e=await Promise.all(t.additionalFiles.map(async e=>s(e,i)));for(let t of e)a=r(t,a)}return e(a)}async function u(e,i,a,o,s,c){let[u,d]=await Promise.all([l(e,a,i),n({cwd:i,name:`storm`,envName:a,defaults:{NAME:s.name?.replace(`@${c.namespace}/`,``),MODE:a,ORG:c.organization},globalRc:!0,packageJson:!0,dotenv:!0,jitiOptions:{fsCache:t(o,`jiti`),moduleCache:!0}})]);return r(u,d.config,c)}function d(e,t){return r({APP_NAME:c(e.config.name||e.packageJson.name?.replace(`/${e.workspaceConfig.namespace}`,``)),APP_VERSION:e.packageJson.version,BUILD_ID:e.meta.buildId,BUILD_TIMESTAMP:new Date(e.meta.timestamp).toISOString(),BUILD_CHECKSUM:e.meta.checksum,RELEASE_ID:e.meta.releaseId,RELEASE_TAG:`${c(e.config.name)}@${e.packageJson.version}`,DEFAULT_LOCALE:e.workspaceConfig.locale,DEFAULT_TIMEZONE:e.workspaceConfig.timezone,LOG_LEVEL:e.config.logLevel,ERROR_URL:e.workspaceConfig.error?.url,ORGANIZATION:a(e.workspaceConfig.organization)?e.workspaceConfig.organization:e.workspaceConfig.organization?.name,PLATFORM:e.config.build.platform,MODE:e.workspaceConfig.mode,DEBUG:e.workspaceConfig.mode===`development`,STACKTRACE:e.workspaceConfig.mode===`development`,ENVIRONMENT:e.environment},i(e?.env?.types?.env)?e.env.types.env?.getProperties().reduce((e,n)=>(e[n.name]=t[n.name]??n.getDefaultValue(),e),{}):{})}async function f(e,t){let[n,i,a]=await Promise.all([u(t,e.config.projectRoot,e.config.mode,e.cachePath,e.packageJson,e.workspaceConfig),u(t,e.workspaceConfig.workspaceRoot,e.config.mode,e.cachePath,e.packageJson,e.workspaceConfig),u(t,e.envPaths.config,e.config.mode,e.cachePath,e.packageJson,e.workspaceConfig)]);return r(d(e,process.env),n,i,a)}export{f as loadEnv,d as loadEnvFromContext};
1
+ import{removeEnvPrefix as e}from"./source-file-env.mjs";import{joinPaths as t}from"@stryke/path/join-paths";import{loadConfig as n}from"c12";import r from"defu";import{isSetObject as i}from"@stryke/type-checks/is-set-object";import{isSetString as a}from"@stryke/type-checks/is-set-string";import{kebabCase as o}from"@stryke/string-format/kebab-case";import{loadEnv as s,loadEnvFile as c}from"@stryke/env/load-env";async function l(t,n,i){let a=await s(i,n);if(t.additionalFiles&&t.additionalFiles?.length>0){let e=await Promise.all(t.additionalFiles.map(async e=>c(e,i)));for(let t of e)a=r(t,a)}return e(a)}async function u(e,i,a,o,s,c){let[u,d]=await Promise.all([l(e,a,i),n({cwd:i,name:`storm`,envName:a,defaults:{NAME:s.name?.replace(`@${c.namespace}/`,``),MODE:a,ORG:c.organization},globalRc:!0,packageJson:!0,dotenv:!0,jitiOptions:{fsCache:t(o,`jiti`),moduleCache:!0}})]);return r(u,d.config,c)}function d(e,t){return r({APP_NAME:o(e.config.name||e.packageJson.name?.replace(`/${e.workspaceConfig.namespace}`,``)),APP_VERSION:e.packageJson.version,BUILD_ID:e.meta.buildId,BUILD_TIMESTAMP:new Date(e.meta.timestamp).toISOString(),BUILD_CHECKSUM:e.meta.checksum,RELEASE_ID:e.meta.releaseId,RELEASE_TAG:`${o(e.config.name)}@${e.packageJson.version}`,DEFAULT_LOCALE:e.workspaceConfig.locale,DEFAULT_TIMEZONE:e.workspaceConfig.timezone,LOG_LEVEL:e.config.logLevel,ERROR_URL:e.workspaceConfig.error?.url,ORGANIZATION:a(e.workspaceConfig.organization)?e.workspaceConfig.organization:e.workspaceConfig.organization?.name,PLATFORM:e.config.build.platform,MODE:e.workspaceConfig.mode,DEBUG:e.workspaceConfig.mode===`development`,STACKTRACE:e.workspaceConfig.mode===`development`,ENVIRONMENT:e.environment},i(e?.env?.types?.env)?e.env.types.env?.getProperties().reduce((e,n)=>(e[n.name]=t[n.name]??n.getDefaultValue(),e),{}):{})}async function f(e,t){let[n,i,a]=await Promise.all([u(t,e.config.projectRoot,e.config.mode,e.cachePath,e.packageJson,e.workspaceConfig),u(t,e.workspaceConfig.workspaceRoot,e.config.mode,e.cachePath,e.packageJson,e.workspaceConfig),u(t,e.envPaths.config,e.config.mode,e.cachePath,e.packageJson,e.workspaceConfig)]);return r(d(e,process.env),n,i,a)}export{f as loadEnv,d as loadEnvFromContext};
@@ -1 +1 @@
1
- const e=require(`../../../_virtual/rolldown_runtime.cjs`);let t=require(`@storm-software/config-tools/types`),n=require(`chalk`);n=e.__toESM(n),require(`@storm-software/config-tools/logger`),require(`@storm-software/config-tools/utilities/colors`),require(`@stryke/helpers/noop`);let r=require(`@stryke/string-format/title-case`);const i=[`#00A0DD`,`#6FCE4E`,`#FBBF24`,`#F43F5E`,`#3B82F6`,`#A855F7`,`#469592`,`#288EDF`,`#10B981`,`#EF4444`,`#F0EC56`,`#F472B6`,`#22D3EE`,`#EAB308`,`#84CC16`,`#F87171`,`#0EA5E9`,`#D946EF`,`#FACC15`,`#34D399`],a=(e,t)=>(a,...o)=>e(a,` ${n.default.inverse.hex(i[t.split(``).map(e=>e.charCodeAt(0)).reduce((e,t)=>e+t,0)%i.length]||i[0])(` ${(0,r.titleCase)(t)} `)} ${o.join(` `)} `);exports.extendLog=a;
1
+ const e=require(`../../../_virtual/rolldown_runtime.cjs`);let t=require(`@storm-software/config-tools/types`),n=require(`chalk`);n=e.__toESM(n),require(`@storm-software/config-tools/logger`),require(`@storm-software/config-tools/utilities/colors`),require(`@stryke/helpers/noop`);let r=require(`@stryke/string-format/kebab-case`),i=require(`@stryke/string-format/title-case`);const a=[`#00A0DD`,`#6FCE4E`,`#FBBF24`,`#F43F5E`,`#3B82F6`,`#A855F7`,`#469592`,`#288EDF`,`#D8B4FE`,`#10B981`,`#EF4444`,`#F0EC56`,`#F472B6`,`#22D3EE`,`#EAB308`,`#84CC16`,`#F87171`,`#0EA5E9`,`#D946EF`,`#FACC15`,`#34D399`,`#8B5CF6`],o=(e,t)=>(r,...o)=>e(r,` ${n.default.inverse.hex(a[t.split(``).map(e=>e.charCodeAt(0)).reduce((e,t)=>e+t,0)%a.length]||a[0])(` ${(0,i.titleCase)(t)} `)} ${o.join(` `)} `);exports.extendLog=o;
@@ -1 +1 @@
1
- import{LogLevelLabel as e}from"@storm-software/config-tools/types";import t from"chalk";import"@storm-software/config-tools/logger";import"@storm-software/config-tools/utilities/colors";import"@stryke/helpers/noop";import{titleCase as n}from"@stryke/string-format/title-case";const r=[`#00A0DD`,`#6FCE4E`,`#FBBF24`,`#F43F5E`,`#3B82F6`,`#A855F7`,`#469592`,`#288EDF`,`#10B981`,`#EF4444`,`#F0EC56`,`#F472B6`,`#22D3EE`,`#EAB308`,`#84CC16`,`#F87171`,`#0EA5E9`,`#D946EF`,`#FACC15`,`#34D399`],i=(e,i)=>(a,...o)=>e(a,` ${t.inverse.hex(r[i.split(``).map(e=>e.charCodeAt(0)).reduce((e,t)=>e+t,0)%r.length]||r[0])(` ${n(i)} `)} ${o.join(` `)} `);export{i as extendLog};
1
+ import{LogLevelLabel as e}from"@storm-software/config-tools/types";import t from"chalk";import"@storm-software/config-tools/logger";import"@storm-software/config-tools/utilities/colors";import"@stryke/helpers/noop";import{kebabCase as n}from"@stryke/string-format/kebab-case";import{titleCase as r}from"@stryke/string-format/title-case";const i=[`#00A0DD`,`#6FCE4E`,`#FBBF24`,`#F43F5E`,`#3B82F6`,`#A855F7`,`#469592`,`#288EDF`,`#D8B4FE`,`#10B981`,`#EF4444`,`#F0EC56`,`#F472B6`,`#22D3EE`,`#EAB308`,`#84CC16`,`#F87171`,`#0EA5E9`,`#D946EF`,`#FACC15`,`#34D399`,`#8B5CF6`],a=(e,n)=>(a,...o)=>e(a,` ${t.inverse.hex(i[n.split(``).map(e=>e.charCodeAt(0)).reduce((e,t)=>e+t,0)%i.length]||i[0])(` ${r(n)} `)} ${o.join(` `)} `);export{a as extendLog};
@@ -37,7 +37,7 @@ type PluginConfigObject<TContext extends PluginContext = PluginContext, TOptions
37
37
  /**
38
38
  * A configuration tuple for a Powerlines plugin.
39
39
  */
40
- type PluginConfig<TContext extends PluginContext = PluginContext> = string | PluginFactory<TContext, void> | Plugin<TContext> | Plugin<TContext>[] | Promise<Plugin<TContext> | Plugin<TContext>[]> | PluginConfigTuple<TContext> | PluginConfigObject<TContext>;
40
+ type PluginConfig<TContext extends PluginContext = PluginContext> = string | PluginFactory<TContext, void> | Plugin<TContext> | PluginConfigTuple<TContext> | PluginConfigObject<TContext> | Promise<PluginConfig<TContext>> | PluginConfig<TContext>[];
41
41
  type ProjectType = "application" | "library";
42
42
  type BabelUserConfig = Parameters<typeof transformAsync>[1] & {
43
43
  /**
@@ -38,7 +38,7 @@ type PluginConfigObject<TContext extends PluginContext = PluginContext, TOptions
38
38
  /**
39
39
  * A configuration tuple for a Powerlines plugin.
40
40
  */
41
- type PluginConfig<TContext extends PluginContext = PluginContext> = string | PluginFactory<TContext, void> | Plugin<TContext> | Plugin<TContext>[] | Promise<Plugin<TContext> | Plugin<TContext>[]> | PluginConfigTuple<TContext> | PluginConfigObject<TContext>;
41
+ type PluginConfig<TContext extends PluginContext = PluginContext> = string | PluginFactory<TContext, void> | Plugin<TContext> | PluginConfigTuple<TContext> | PluginConfigObject<TContext> | Promise<PluginConfig<TContext>> | PluginConfig<TContext>[];
42
42
  type ProjectType = "application" | "library";
43
43
  type BabelUserConfig = Parameters<typeof transformAsync>[1] & {
44
44
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-crypto",
3
- "version": "0.10.80",
3
+ "version": "0.10.82",
4
4
  "type": "module",
5
5
  "description": "A Powerlines plugin that provides unique identifier generation capabilities at runtime by adding the `id` builtin module.",
6
6
  "repository": {
@@ -128,17 +128,17 @@
128
128
  "files": ["dist/**/*"],
129
129
  "keywords": ["powerlines", "storm-software", "powerlines-plugin"],
130
130
  "dependencies": {
131
- "@powerlines/plugin-env": "^0.14.5",
131
+ "@powerlines/plugin-env": "^0.14.7",
132
132
  "@storm-software/config-tools": "^1.188.74",
133
133
  "@stryke/path": "^0.24.0",
134
134
  "defu": "^6.1.4",
135
- "powerlines": "^0.36.7",
135
+ "powerlines": "^0.36.9",
136
136
  "@noble/ciphers": "^2.1.1"
137
137
  },
138
138
  "devDependencies": {
139
- "@powerlines/nx": "^0.11.33",
139
+ "@powerlines/nx": "^0.11.35",
140
140
  "@types/node": "^24.10.4"
141
141
  },
142
142
  "publishConfig": { "access": "public" },
143
- "gitHead": "abbf694ae460ab6f58ae645a000cabf4a4fdac80"
143
+ "gitHead": "e9fb959df894f1aa67074af9fbb126978a450a45"
144
144
  }
@@ -1,6 +0,0 @@
1
- import "../../../powerlines/src/types/build.mjs";
2
- import "../../../powerlines/src/types/config.mjs";
3
- import "../../../powerlines/src/types/resolved.mjs";
4
- import "../../../powerlines/src/types/context.mjs";
5
- import "@alloy-js/core";
6
- import { TypeDefinitionParameter } from "@stryke/types/configuration";