@ms-cloudpack/common-types 0.23.4 → 0.23.5

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,6 +1,6 @@
1
1
  export interface BundleOutputFile {
2
2
  /**
3
- * The relative path to the output file (starting from `BundleResult#outputPath`),
3
+ * The normalized relative path to the output file (starting from `BundleResult#outputPath`),
4
4
  * with forward slashes and an extension.
5
5
  */
6
6
  outputPath: string;
@@ -1 +1 @@
1
- {"version":3,"file":"BundleOutputFile.js","sourceRoot":"","sources":["../src/BundleOutputFile.ts"],"names":[],"mappings":"","sourcesContent":["export interface BundleOutputFile {\n /**\n * The relative path to the output file (starting from `BundleResult#outputPath`),\n * with forward slashes and an extension.\n */\n outputPath: string;\n\n /**\n * The relative path to the entry file (starting from `BundleResult#inputPath`),\n * with forward slashes and an extension. This will only be set for files that were\n * listed in `entries`.\n */\n entryPoint?: string;\n\n /**\n * The list of export names coming from the output file.\n *\n * WARNING: This is not set by all bundlers!\n */\n exports?: string[];\n\n /**\n * Whether the file is a Worker.\n *\n * WARNING: This is not set by all bundlers!\n */\n isWorker?: boolean;\n}\n"]}
1
+ {"version":3,"file":"BundleOutputFile.js","sourceRoot":"","sources":["../src/BundleOutputFile.ts"],"names":[],"mappings":"","sourcesContent":["export interface BundleOutputFile {\n /**\n * The normalized relative path to the output file (starting from `BundleResult#outputPath`),\n * with forward slashes and an extension.\n */\n outputPath: string;\n\n /**\n * The relative path to the entry file (starting from `BundleResult#inputPath`),\n * with forward slashes and an extension. This will only be set for files that were\n * listed in `entries`.\n */\n entryPoint?: string;\n\n /**\n * The list of export names coming from the output file.\n *\n * WARNING: This is not set by all bundlers!\n */\n exports?: string[];\n\n /**\n * Whether the file is a Worker.\n *\n * WARNING: This is not set by all bundlers!\n */\n isWorker?: boolean;\n}\n"]}
@@ -33,6 +33,14 @@ export type InternalBundlerCapabilities = {
33
33
  'asset-inline': {
34
34
  extensions: string[];
35
35
  };
36
+ /**
37
+ * Bundler capability to support Density externals.
38
+ * This is not a real capability, it's just an indicator that a package needs to use density post-bundle task.
39
+ * Since there is no actual way to execute post-budle tasks, I'm using this as a workaround.
40
+ * This will be removed once we have a proper way to execute post-bundle tasks with the plugins.
41
+ * Options: object is empty because it's just an indicator. No options are needed.
42
+ */
43
+ density: object;
36
44
  /**
37
45
  * Adds aliases to externalized packages.
38
46
  */
@@ -1 +1 @@
1
- {"version":3,"file":"BundlerCapability.d.ts","sourceRoot":"","sources":["../src/BundlerCapability.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,MAAM,yBAAyB,CAAC,OAAO,EAAE,QAAQ,SAAS,MAAM,IAAI,CACxE,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,QAAQ,KACd,OAAO,CAAC;AAEb;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,CAAC,QAAQ,SAAS,MAAM,IAAI;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE;QACf,CAAC,OAAO,EAAE,MAAM,GAAG,yBAAyB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;KACjE,CAAC;CACH,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC;;;OAGG;IACH,cAAc,EAAE;QAAE,UAAU,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAEzC;;OAEG;IACH,KAAK,EAAE;QACL,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACvB,CAAC;CACH,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,kCAAkC,GAAG;KAC9C,GAAG,IAAI,MAAM,2BAA2B,CAAC,CAAC,EAAE,2BAA2B,CAAC,GAAG,CAAC,GAAG,KAAK;CACtF,CAAC;AAEF,KAAK,kCAAkC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC;AAEzE;;;;;GAKG;AACH,MAAM,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M,GAAG,MAAM,CAAC;KACvB,CAAC;CACH,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,kCAAkC,GAAG;KAC9C,GAAG,IAAI,MAAM,2BAA2B,CAAC,CAAC,EAAE,2BAA2B,CAAC,GAAG,CAAC,GAAG,KAAK;CACtF,CAAC;AAEF,KAAK,kCAAkC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC;AAEzE;;;;;GAKG;AACH,MAAM,MAAM,0BAA0B,GAAG,kCAAkC,GAAG,kCAAkC,CAAC;AAEjH;;;;GAIG;AACH,MAAM,MAAM,mCAAmC,GAAG;KAC/C,GAAG,IAAI,MAAM,2BAA2B,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC;CAC3F,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,wCAAwC,CAAC,OAAO,IAAI;KAC7D,GAAG,IAAI,MAAM,2BAA2B,GAAG,yBAAyB,CAAC,OAAO,EAAE,2BAA2B,CAAC,GAAG,CAAC,CAAC;CACjH,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,+BAA+B,CAAC,OAAO,SAAS,MAAM,IAAI;IACpE,OAAO,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;CACrC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"BundlerCapability.js","sourceRoot":"","sources":["../src/BundlerCapability.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * A function that takes a config object and options object and returns a new config object.\n * This is used to implement a bundler capability.\n *\n * - `TConfig` is the type of the bundler's config object. (ie: `WebpackConfiguration`, `OriBuildOptions`, etc)\n * - `TOptions` is the type of the options object that's passed to the capability. (ie: `{ banner: string }`\n * or any other type that the capability needs when enabled)\n */\nexport type BundlerCapabilityFunction<TConfig, TOptions extends object> = (\n config: TConfig,\n options: TOptions,\n) => TConfig;\n\n/**\n * A bundler capability is a feature that can be enabled for a package to modify the bundling process.\n *\n * `TOptions` is the type of the options object that's passed to the capability. (ie: `{ banner: string }`\n * or any other type that the capability needs when enabled)\n */\nexport type BundlerCapability<TOptions extends object> = {\n name: string;\n description: string;\n implementations: {\n [bundler: string]: BundlerCapabilityFunction<unknown, TOptions>;\n };\n};\n\n/**\n * This is the list of the bundler capabilities that cloudpack provides.\n * - key: The name of the capability which will be used in the cloudpack config to enable the capability\n * - value: Options object which will be passed to the capability function\n */\nexport type InternalBundlerCapabilities = {\n /**\n * Inlines assets into the bundle.\n * Options: List of file extensions to inline. Do not include the leading dot.\n */\n 'asset-inline': { extensions: string[] };\n\n /**\n * Adds aliases to externalized packages.\n */\n alias: {\n [key: string]: string;\n };\n};\n\n/**\n * This is the type that's being used `PackageSettings` to enable/disable bundler capabilities.\n * - Key: internal capability name\n * - Value: options object to configure the capability, or false to disable it\n */\nexport type InternalBundlerCapabilitiesOptions = {\n [key in keyof InternalBundlerCapabilities]?: InternalBundlerCapabilities[key] | false;\n};\n\ntype ExternalBundlerCapabilitiesOptions = Record<string, object | false>;\n\n/**\n * Options used in `PackageSettings` to configure or disable bundler capabilities.\n * - Key: capability name, either internal (Cloudpack-provided) or external (as specified in\n * `AppConfig.bundlerCapabilitiesRegistry`)\n * - Value: options object to configure the capability, or false to disable it.\n */\nexport type BundlerCapabilitiesOptions = InternalBundlerCapabilitiesOptions & ExternalBundlerCapabilitiesOptions;\n\n/**\n * Metadata for the bundler capabilities that cloudpack provides.\n * - Key: capability name\n * - Value: metadata object with description\n */\nexport type InternalBundlerCapabilitiesMetaData = {\n [key in keyof InternalBundlerCapabilities]: Pick<BundlerCapability<object>, 'description'>;\n};\n\n/**\n * This is a bundler specific implementation of the internal bundler capabilities.\n * It's a mapping from the capability name to the capability function.\n *\n * `TConfig` is the type of the bundler's config object. (ie: `WebpackConfiguration`, `OriBuildOptions`, etc)\n */\nexport type InternalBundlerCapabilityImplementations<TConfig> = {\n [key in keyof InternalBundlerCapabilities]: BundlerCapabilityFunction<TConfig, InternalBundlerCapabilities[key]>;\n};\n\n/**\n * This is the type of the external bundler capability module that's being imported.\n *\n * `TConfig` is the type of the bundler's config object. (ie: `WebpackConfiguration`, `OriBuildOptions`, etc)\n */\nexport type ExternalBundlerCapabilityModule<TConfig extends object> = {\n default: BundlerCapability<TConfig>;\n};\n"]}
1
+ {"version":3,"file":"BundlerCapability.js","sourceRoot":"","sources":["../src/BundlerCapability.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * A function that takes a config object and options object and returns a new config object.\n * This is used to implement a bundler capability.\n *\n * - `TConfig` is the type of the bundler's config object. (ie: `WebpackConfiguration`, `OriBuildOptions`, etc)\n * - `TOptions` is the type of the options object that's passed to the capability. (ie: `{ banner: string }`\n * or any other type that the capability needs when enabled)\n */\nexport type BundlerCapabilityFunction<TConfig, TOptions extends object> = (\n config: TConfig,\n options: TOptions,\n) => TConfig;\n\n/**\n * A bundler capability is a feature that can be enabled for a package to modify the bundling process.\n *\n * `TOptions` is the type of the options object that's passed to the capability. (ie: `{ banner: string }`\n * or any other type that the capability needs when enabled)\n */\nexport type BundlerCapability<TOptions extends object> = {\n name: string;\n description: string;\n implementations: {\n [bundler: string]: BundlerCapabilityFunction<unknown, TOptions>;\n };\n};\n\n/**\n * This is the list of the bundler capabilities that cloudpack provides.\n * - key: The name of the capability which will be used in the cloudpack config to enable the capability\n * - value: Options object which will be passed to the capability function\n */\nexport type InternalBundlerCapabilities = {\n /**\n * Inlines assets into the bundle.\n * Options: List of file extensions to inline. Do not include the leading dot.\n */\n 'asset-inline': { extensions: string[] };\n\n /**\n * Bundler capability to support Density externals.\n * This is not a real capability, it's just an indicator that a package needs to use density post-bundle task.\n * Since there is no actual way to execute post-budle tasks, I'm using this as a workaround.\n * This will be removed once we have a proper way to execute post-bundle tasks with the plugins.\n * Options: object is empty because it's just an indicator. No options are needed.\n */\n density: object;\n\n /**\n * Adds aliases to externalized packages.\n */\n alias: {\n [key: string]: string;\n };\n};\n\n/**\n * This is the type that's being used `PackageSettings` to enable/disable bundler capabilities.\n * - Key: internal capability name\n * - Value: options object to configure the capability, or false to disable it\n */\nexport type InternalBundlerCapabilitiesOptions = {\n [key in keyof InternalBundlerCapabilities]?: InternalBundlerCapabilities[key] | false;\n};\n\ntype ExternalBundlerCapabilitiesOptions = Record<string, object | false>;\n\n/**\n * Options used in `PackageSettings` to configure or disable bundler capabilities.\n * - Key: capability name, either internal (Cloudpack-provided) or external (as specified in\n * `AppConfig.bundlerCapabilitiesRegistry`)\n * - Value: options object to configure the capability, or false to disable it.\n */\nexport type BundlerCapabilitiesOptions = InternalBundlerCapabilitiesOptions & ExternalBundlerCapabilitiesOptions;\n\n/**\n * Metadata for the bundler capabilities that cloudpack provides.\n * - Key: capability name\n * - Value: metadata object with description\n */\nexport type InternalBundlerCapabilitiesMetaData = {\n [key in keyof InternalBundlerCapabilities]: Pick<BundlerCapability<object>, 'description'>;\n};\n\n/**\n * This is a bundler specific implementation of the internal bundler capabilities.\n * It's a mapping from the capability name to the capability function.\n *\n * `TConfig` is the type of the bundler's config object. (ie: `WebpackConfiguration`, `OriBuildOptions`, etc)\n */\nexport type InternalBundlerCapabilityImplementations<TConfig> = {\n [key in keyof InternalBundlerCapabilities]: BundlerCapabilityFunction<TConfig, InternalBundlerCapabilities[key]>;\n};\n\n/**\n * This is the type of the external bundler capability module that's being imported.\n *\n * `TConfig` is the type of the bundler's config object. (ie: `WebpackConfiguration`, `OriBuildOptions`, etc)\n */\nexport type ExternalBundlerCapabilityModule<TConfig extends object> = {\n default: BundlerCapability<TConfig>;\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ms-cloudpack/common-types",
3
- "version": "0.23.4",
3
+ "version": "0.23.5",
4
4
  "description": "Common types for Cloudpack.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1060,6 +1060,17 @@
1060
1060
  }
1061
1061
  ]
1062
1062
  },
1063
+ "density": {
1064
+ "anyOf": [
1065
+ {
1066
+ "type": "object"
1067
+ },
1068
+ {
1069
+ "type": "boolean",
1070
+ "const": false
1071
+ }
1072
+ ]
1073
+ },
1063
1074
  "alias": {
1064
1075
  "anyOf": [
1065
1076
  {
@@ -1061,6 +1061,17 @@
1061
1061
  }
1062
1062
  ]
1063
1063
  },
1064
+ "density": {
1065
+ "anyOf": [
1066
+ {
1067
+ "type": "object"
1068
+ },
1069
+ {
1070
+ "type": "boolean",
1071
+ "const": false
1072
+ }
1073
+ ]
1074
+ },
1064
1075
  "alias": {
1065
1076
  "anyOf": [
1066
1077
  {