@ms-cloudpack/common-types 0.1.1
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/README.md +3 -0
- package/lib/BundleContext.d.ts +6 -0
- package/lib/BundleContext.d.ts.map +1 -0
- package/lib/BundleContext.js +2 -0
- package/lib/BundleContext.js.map +1 -0
- package/lib/BundleMessage.d.ts +10 -0
- package/lib/BundleMessage.d.ts.map +1 -0
- package/lib/BundleMessage.js +2 -0
- package/lib/BundleMessage.js.map +1 -0
- package/lib/BundleMessageLocation.d.ts +12 -0
- package/lib/BundleMessageLocation.d.ts.map +1 -0
- package/lib/BundleMessageLocation.js +2 -0
- package/lib/BundleMessageLocation.js.map +1 -0
- package/lib/BundleMessageNote.d.ts +6 -0
- package/lib/BundleMessageNote.d.ts.map +1 -0
- package/lib/BundleMessageNote.js +2 -0
- package/lib/BundleMessageNote.js.map +1 -0
- package/lib/BundleOptions.d.ts +57 -0
- package/lib/BundleOptions.d.ts.map +1 -0
- package/lib/BundleOptions.js +2 -0
- package/lib/BundleOptions.js.map +1 -0
- package/lib/BundleOutputFile.d.ts +17 -0
- package/lib/BundleOutputFile.d.ts.map +1 -0
- package/lib/BundleOutputFile.js +2 -0
- package/lib/BundleOutputFile.js.map +1 -0
- package/lib/BundleResult.d.ts +23 -0
- package/lib/BundleResult.d.ts.map +1 -0
- package/lib/BundleResult.js +2 -0
- package/lib/BundleResult.js.map +1 -0
- package/lib/BundlerPlugin.d.ts +8 -0
- package/lib/BundlerPlugin.d.ts.map +1 -0
- package/lib/BundlerPlugin.js +2 -0
- package/lib/BundlerPlugin.js.map +1 -0
- package/lib/BundlerPluginResult.d.ts +43 -0
- package/lib/BundlerPluginResult.d.ts.map +1 -0
- package/lib/BundlerPluginResult.js +2 -0
- package/lib/BundlerPluginResult.js.map +1 -0
- package/lib/CloudpackConfig.d.ts +9 -0
- package/lib/CloudpackConfig.d.ts.map +1 -0
- package/lib/CloudpackConfig.js +2 -0
- package/lib/CloudpackConfig.js.map +1 -0
- package/lib/DevServer.d.ts +44 -0
- package/lib/DevServer.d.ts.map +1 -0
- package/lib/DevServer.js +2 -0
- package/lib/DevServer.js.map +1 -0
- package/lib/Feature.d.ts +4 -0
- package/lib/Feature.d.ts.map +1 -0
- package/lib/Feature.js +2 -0
- package/lib/Feature.js.map +1 -0
- package/lib/Features.d.ts +8 -0
- package/lib/Features.d.ts.map +1 -0
- package/lib/Features.js +2 -0
- package/lib/Features.js.map +1 -0
- package/lib/GeneratedConfig.d.ts +17 -0
- package/lib/GeneratedConfig.d.ts.map +1 -0
- package/lib/GeneratedConfig.js +2 -0
- package/lib/GeneratedConfig.js.map +1 -0
- package/lib/HttpsConfig.d.ts +9 -0
- package/lib/HttpsConfig.d.ts.map +1 -0
- package/lib/HttpsConfig.js +2 -0
- package/lib/HttpsConfig.js.map +1 -0
- package/lib/PackageDefinitionsCache.d.ts +51 -0
- package/lib/PackageDefinitionsCache.d.ts.map +1 -0
- package/lib/PackageDefinitionsCache.js +2 -0
- package/lib/PackageDefinitionsCache.js.map +1 -0
- package/lib/PackageJson.d.ts +134 -0
- package/lib/PackageJson.d.ts.map +1 -0
- package/lib/PackageJson.js +2 -0
- package/lib/PackageJson.js.map +1 -0
- package/lib/PackageOverride.d.ts +8 -0
- package/lib/PackageOverride.d.ts.map +1 -0
- package/lib/PackageOverride.js +2 -0
- package/lib/PackageOverride.js.map +1 -0
- package/lib/PackageSettings.d.ts +56 -0
- package/lib/PackageSettings.d.ts.map +1 -0
- package/lib/PackageSettings.js +2 -0
- package/lib/PackageSettings.js.map +1 -0
- package/lib/Route.d.ts +23 -0
- package/lib/Route.d.ts.map +1 -0
- package/lib/Route.js +2 -0
- package/lib/Route.js.map +1 -0
- package/lib/TelemetryConfig.d.ts +7 -0
- package/lib/TelemetryConfig.d.ts.map +1 -0
- package/lib/TelemetryConfig.js +2 -0
- package/lib/TelemetryConfig.js.map +1 -0
- package/lib/UserConfig.d.ts +73 -0
- package/lib/UserConfig.d.ts.map +1 -0
- package/lib/UserConfig.js +2 -0
- package/lib/UserConfig.js.map +1 -0
- package/lib/allFeatures.d.ts +15 -0
- package/lib/allFeatures.d.ts.map +1 -0
- package/lib/allFeatures.js +16 -0
- package/lib/allFeatures.js.map +1 -0
- package/lib/index.d.ts +24 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -0
- package/lib/tsdoc-metadata.json +11 -0
- package/package.json +32 -0
- package/schema/GeneratedConfig.json +622 -0
- package/schema/UserConfig.json +655 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for the `package.json` file, derived from [`type-fest`](https://github.com/sindresorhus/type-fest/blob/main/source/package-json.d.ts).
|
|
3
|
+
*
|
|
4
|
+
* This version intentionally does not permit arbitrary keys, and focuses on properties that are
|
|
5
|
+
* potentially relevant to Cloudpack. Additional properties can be added as needed.
|
|
6
|
+
*/
|
|
7
|
+
export type PackageJson = {
|
|
8
|
+
/** The name of the package. */
|
|
9
|
+
name?: string;
|
|
10
|
+
/** A description of the package. */
|
|
11
|
+
description?: string;
|
|
12
|
+
/** Package semantic version. */
|
|
13
|
+
version?: string;
|
|
14
|
+
/** The files included in the package. */
|
|
15
|
+
files?: string[];
|
|
16
|
+
/** Indicates the structure of the package. https://docs.npmjs.com/cli/v9/configuring-npm/package-json#directories */
|
|
17
|
+
directories?: {
|
|
18
|
+
[directoryType: string]: string | undefined;
|
|
19
|
+
bin?: string;
|
|
20
|
+
lib?: string;
|
|
21
|
+
};
|
|
22
|
+
/** Resolution algorithm for importing ".js" files from the package's scope. https://nodejs.org/api/esm.html#esm_package_json_type_field */
|
|
23
|
+
type?: 'module' | 'commonjs';
|
|
24
|
+
/** The module ID that is the primary entry point to the package. */
|
|
25
|
+
main?: string;
|
|
26
|
+
/** An ECMAScript module ID that is the primary entry point to the package. */
|
|
27
|
+
module?: string;
|
|
28
|
+
/** The executable file(s) for this package. */
|
|
29
|
+
bin?: string | Partial<Record<string, string>>;
|
|
30
|
+
/** A module ID with untranspiled code that is the primary entry point to the package. */
|
|
31
|
+
esnext?: string | {
|
|
32
|
+
[moduleName: string]: string | undefined;
|
|
33
|
+
main?: string;
|
|
34
|
+
browser?: string;
|
|
35
|
+
};
|
|
36
|
+
/** A hint to JavaScript bundlers or component tools when packaging modules for client side use. */
|
|
37
|
+
browser?: string | Partial<Record<string, string | false>>;
|
|
38
|
+
/**
|
|
39
|
+
* Denote which files in the package have side effects and may not be pruned by bundlers, even if unused.
|
|
40
|
+
* If a boolean, applies to all files in the package. `false` indicates there are no side effects.
|
|
41
|
+
* https://webpack.js.org/guides/tree-shaking/
|
|
42
|
+
*/
|
|
43
|
+
sideEffects?: boolean | string[];
|
|
44
|
+
/** Location of the bundled TypeScript declaration file. */
|
|
45
|
+
types?: string;
|
|
46
|
+
/** Location of the bundled TypeScript declaration file. Alias of `types`. */
|
|
47
|
+
typings?: string;
|
|
48
|
+
/** Location of TypeScript declaration files for different TypeScript versions. */
|
|
49
|
+
typesVersions?: Partial<Record<string, Partial<Record<string, string[]>>>>;
|
|
50
|
+
/** Subpath exports to define entry points of the package. https://nodejs.org/api/packages.html#subpath-exports */
|
|
51
|
+
exports?: PackageJsonExports;
|
|
52
|
+
/**
|
|
53
|
+
* Subpath imports to define internal package import maps that only apply to import specifiers from
|
|
54
|
+
* within the package itself. https://nodejs.org/api/packages.html#subpath-imports
|
|
55
|
+
*/
|
|
56
|
+
imports?: PackageJsonImports;
|
|
57
|
+
/** Dependencies that will be installed when the package is consumed. */
|
|
58
|
+
dependencies?: PackageJsonDependencies;
|
|
59
|
+
/** Dependencies for local development only. */
|
|
60
|
+
devDependencies?: PackageJsonDependencies;
|
|
61
|
+
/** Dependencies that must be installed alongside this package when consumed. */
|
|
62
|
+
peerDependencies?: PackageJsonDependencies;
|
|
63
|
+
/** Indicates which peer dependencies are optional. */
|
|
64
|
+
peerDependenciesMeta?: Partial<Record<string, {
|
|
65
|
+
optional: true;
|
|
66
|
+
}>>;
|
|
67
|
+
optionalDependencies?: PackageJsonDependencies;
|
|
68
|
+
bundledDependencies?: PackageJsonDependencies | string[];
|
|
69
|
+
bundleDependencies?: PackageJsonDependencies | string[];
|
|
70
|
+
resolutions?: PackageJsonDependencies;
|
|
71
|
+
/** Required engine versions for running this package. */
|
|
72
|
+
engines?: {
|
|
73
|
+
[engine in LiteralOrString<'npm' | 'node'>]?: string;
|
|
74
|
+
};
|
|
75
|
+
/** Operating systems the package can run on. */
|
|
76
|
+
os?: Array<LiteralOrString<'aix' | 'darwin' | 'freebsd' | 'linux' | 'openbsd' | 'sunos' | 'win32' | '!aix' | '!darwin' | '!freebsd' | '!linux' | '!openbsd' | '!sunos' | '!win32'>>;
|
|
77
|
+
/** CPU architectures the package can run on. */
|
|
78
|
+
cpu?: Array<LiteralOrString<'arm' | 'arm64' | 'ia32' | 'mips' | 'mipsel' | 'ppc' | 'ppc64' | 's390' | 's390x' | 'x32' | 'x64' | '!arm' | '!arm64' | '!ia32' | '!mips' | '!mipsel' | '!ppc' | '!ppc64' | '!s390' | '!s390x' | '!x32' | '!x64'>>;
|
|
79
|
+
/** If `true`, this package cannot be published. */
|
|
80
|
+
private?: boolean;
|
|
81
|
+
/** A set of config values that will be used during publishing. https://docs.npmjs.com/cli/v7/configuring-npm/package-json#publishconfig */
|
|
82
|
+
publishConfig?: {
|
|
83
|
+
access?: 'public' | 'restricted';
|
|
84
|
+
registry?: string;
|
|
85
|
+
tag?: string;
|
|
86
|
+
[additionalProperties: string]: unknown;
|
|
87
|
+
};
|
|
88
|
+
/** Defines which package manager is expected to be used when working on the current project. https://nodejs.org/api/corepack.html */
|
|
89
|
+
packageManager?: string;
|
|
90
|
+
/** Configuration for npm or yarn workspaces. */
|
|
91
|
+
workspaces?: string[] | {
|
|
92
|
+
/** An array of workspace pattern strings which contain the workspace packages. */
|
|
93
|
+
packages?: string[];
|
|
94
|
+
/** Prevent hoisting of these dependencies within the workspace (yarn only). https://classic.yarnpkg.com/blog/2018/02/15/nohoist/) */
|
|
95
|
+
nohoist?: string[];
|
|
96
|
+
};
|
|
97
|
+
/** Cloudpack internally added property: name and version prior to nonSemverTransform (if different) */
|
|
98
|
+
cloudpackRemapped?: {
|
|
99
|
+
originalName: string;
|
|
100
|
+
originalVersion: string;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Union type which has intellisense for specific keys but also allows arbitrary strings.
|
|
105
|
+
* This is a workaround for a [TypeScript issue](https://github.com/Microsoft/TypeScript/issues/29729)
|
|
106
|
+
*/
|
|
107
|
+
export type LiteralOrString<LiteralType extends string> = LiteralType | (string & Record<never, never>);
|
|
108
|
+
/** Conditions which provide a way to resolve a package entry point based on the environment. */
|
|
109
|
+
export type PackageJsonExportCondition = LiteralOrString<'browser' | 'default' | 'deno' | 'electron' | 'import' | 'module' | 'node-addons' | 'node' | 'react-native' | 'require'>;
|
|
110
|
+
/**
|
|
111
|
+
* The value of an `PackageJson.exports` object key. Note at the root of the object, keys can be represented
|
|
112
|
+
* either by a condition, or a `string` to provide import paths (such as "./foo"). At subsequent levels
|
|
113
|
+
* within the object, only conditions (string which don't start with ".") can be used as keys.
|
|
114
|
+
*/
|
|
115
|
+
export type PackageJsonExportsValue = null | string | {
|
|
116
|
+
[condition in PackageJsonExportCondition]?: PackageJsonExportsValue;
|
|
117
|
+
} | Array<PackageJsonExportsValue>;
|
|
118
|
+
/**
|
|
119
|
+
* Definition of the root exports object. Keys can be either conditions or import paths.
|
|
120
|
+
*/
|
|
121
|
+
export type PackageJsonExportsObject = {
|
|
122
|
+
[pathOrCondition: string]: PackageJsonExportsValue;
|
|
123
|
+
};
|
|
124
|
+
/** Entry points of a package, optionally with conditions and subpath exports. Used as `PackageJson.exports`. */
|
|
125
|
+
export type PackageJsonExports = PackageJsonExportsValue | PackageJsonExportsObject | Array<PackageJsonExports>;
|
|
126
|
+
/** Import map entries of a module, optionally with conditions. */
|
|
127
|
+
export type PackageJsonImports = {
|
|
128
|
+
[key: `#${string}`]: string | {
|
|
129
|
+
[key in PackageJsonExportCondition]: PackageJsonExports;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
/** Mapping from dependency name to semver spec. */
|
|
133
|
+
export type PackageJsonDependencies = Partial<Record<string, string>>;
|
|
134
|
+
//# sourceMappingURL=PackageJson.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PackageJson.d.ts","sourceRoot":"","sources":["../src/PackageJson.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PackageJson.js","sourceRoot":"","sources":["../src/PackageJson.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Types for the `package.json` file, derived from [`type-fest`](https://github.com/sindresorhus/type-fest/blob/main/source/package-json.d.ts).\n *\n * This version intentionally does not permit arbitrary keys, and focuses on properties that are\n * potentially relevant to Cloudpack. Additional properties can be added as needed.\n */\nexport type PackageJson = {\n /** The name of the package. */\n name?: string;\n\n /** A description of the package. */\n description?: string;\n\n /** Package semantic version. */\n version?: string;\n\n /** The files included in the package. */\n files?: string[];\n\n /** Indicates the structure of the package. https://docs.npmjs.com/cli/v9/configuring-npm/package-json#directories */\n directories?: {\n [directoryType: string]: string | undefined;\n bin?: string;\n lib?: string;\n };\n\n /** Resolution algorithm for importing \".js\" files from the package's scope. https://nodejs.org/api/esm.html#esm_package_json_type_field */\n type?: 'module' | 'commonjs';\n\n /** The module ID that is the primary entry point to the package. */\n main?: string;\n\n /** An ECMAScript module ID that is the primary entry point to the package. */\n module?: string;\n\n /** The executable file(s) for this package. */\n bin?: string | Partial<Record<string, string>>;\n\n /** A module ID with untranspiled code that is the primary entry point to the package. */\n esnext?:\n | string\n | {\n [moduleName: string]: string | undefined;\n main?: string;\n browser?: string;\n };\n\n /** A hint to JavaScript bundlers or component tools when packaging modules for client side use. */\n browser?: string | Partial<Record<string, string | false>>;\n\n /**\n * Denote which files in the package have side effects and may not be pruned by bundlers, even if unused.\n * If a boolean, applies to all files in the package. `false` indicates there are no side effects.\n * https://webpack.js.org/guides/tree-shaking/\n */\n sideEffects?: boolean | string[];\n\n /** Location of the bundled TypeScript declaration file. */\n types?: string;\n\n /** Location of the bundled TypeScript declaration file. Alias of `types`. */\n typings?: string;\n\n /** Location of TypeScript declaration files for different TypeScript versions. */\n typesVersions?: Partial<Record<string, Partial<Record<string, string[]>>>>;\n\n /** Subpath exports to define entry points of the package. https://nodejs.org/api/packages.html#subpath-exports */\n exports?: PackageJsonExports;\n\n /**\n * Subpath imports to define internal package import maps that only apply to import specifiers from\n * within the package itself. https://nodejs.org/api/packages.html#subpath-imports\n */\n imports?: PackageJsonImports;\n\n /** Dependencies that will be installed when the package is consumed. */\n dependencies?: PackageJsonDependencies;\n\n /** Dependencies for local development only. */\n devDependencies?: PackageJsonDependencies;\n\n /** Dependencies that must be installed alongside this package when consumed. */\n peerDependencies?: PackageJsonDependencies;\n\n /** Indicates which peer dependencies are optional. */\n peerDependenciesMeta?: Partial<Record<string, { optional: true }>>;\n\n optionalDependencies?: PackageJsonDependencies;\n bundledDependencies?: PackageJsonDependencies | string[];\n bundleDependencies?: PackageJsonDependencies | string[];\n\n resolutions?: PackageJsonDependencies;\n\n /** Required engine versions for running this package. */\n engines?: {\n [engine in LiteralOrString<'npm' | 'node'>]?: string;\n };\n\n /** Operating systems the package can run on. */\n os?: Array<\n LiteralOrString<\n | 'aix'\n | 'darwin'\n | 'freebsd'\n | 'linux'\n | 'openbsd'\n | 'sunos'\n | 'win32'\n | '!aix'\n | '!darwin'\n | '!freebsd'\n | '!linux'\n | '!openbsd'\n | '!sunos'\n | '!win32'\n >\n >;\n\n /** CPU architectures the package can run on. */\n cpu?: Array<\n LiteralOrString<\n | 'arm'\n | 'arm64'\n | 'ia32'\n | 'mips'\n | 'mipsel'\n | 'ppc'\n | 'ppc64'\n | 's390'\n | 's390x'\n | 'x32'\n | 'x64'\n | '!arm'\n | '!arm64'\n | '!ia32'\n | '!mips'\n | '!mipsel'\n | '!ppc'\n | '!ppc64'\n | '!s390'\n | '!s390x'\n | '!x32'\n | '!x64'\n >\n >;\n\n /** If `true`, this package cannot be published. */\n private?: boolean;\n\n /** A set of config values that will be used during publishing. https://docs.npmjs.com/cli/v7/configuring-npm/package-json#publishconfig */\n publishConfig?: {\n access?: 'public' | 'restricted';\n registry?: string;\n tag?: string;\n [additionalProperties: string]: unknown;\n };\n\n /** Defines which package manager is expected to be used when working on the current project. https://nodejs.org/api/corepack.html */\n packageManager?: string;\n\n /** Configuration for npm or yarn workspaces. */\n workspaces?:\n | string[]\n | {\n /** An array of workspace pattern strings which contain the workspace packages. */\n packages?: string[];\n\n /** Prevent hoisting of these dependencies within the workspace (yarn only). https://classic.yarnpkg.com/blog/2018/02/15/nohoist/) */\n nohoist?: string[];\n };\n\n /** Cloudpack internally added property: name and version prior to nonSemverTransform (if different) */\n cloudpackRemapped?: { originalName: string; originalVersion: string };\n};\n\n/**\n * Union type which has intellisense for specific keys but also allows arbitrary strings.\n * This is a workaround for a [TypeScript issue](https://github.com/Microsoft/TypeScript/issues/29729)\n */\nexport type LiteralOrString<LiteralType extends string> = LiteralType | (string & Record<never, never>);\n\n/** Conditions which provide a way to resolve a package entry point based on the environment. */\nexport type PackageJsonExportCondition = LiteralOrString<\n | 'browser'\n | 'default'\n | 'deno'\n | 'electron'\n | 'import'\n | 'module'\n | 'node-addons'\n | 'node'\n | 'react-native'\n | 'require'\n>;\n\n/**\n * The value of an `PackageJson.exports` object key. Note at the root of the object, keys can be represented\n * either by a condition, or a `string` to provide import paths (such as \"./foo\"). At subsequent levels\n * within the object, only conditions (string which don't start with \".\") can be used as keys.\n */\nexport type PackageJsonExportsValue =\n | null\n | string\n | { [condition in PackageJsonExportCondition]?: PackageJsonExportsValue }\n | Array<PackageJsonExportsValue>;\n\n/**\n * Definition of the root exports object. Keys can be either conditions or import paths.\n */\nexport type PackageJsonExportsObject = {\n [pathOrCondition: string]: PackageJsonExportsValue;\n};\n/** Entry points of a package, optionally with conditions and subpath exports. Used as `PackageJson.exports`. */\nexport type PackageJsonExports = PackageJsonExportsValue | PackageJsonExportsObject | Array<PackageJsonExports>;\n\n/** Import map entries of a module, optionally with conditions. */\nexport type PackageJsonImports = {\n [key: `#${string}`]: string | { [key in PackageJsonExportCondition]: PackageJsonExports };\n};\n\n/** Mapping from dependency name to semver spec. */\nexport type PackageJsonDependencies = Partial<Record<string, string>>;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PackageOverride.d.ts","sourceRoot":"","sources":["../src/PackageOverride.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,WAAW,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PackageOverride.js","sourceRoot":"","sources":["../src/PackageOverride.ts"],"names":[],"mappings":"","sourcesContent":["import type { PackageJson } from './PackageJson.js';\n\nexport interface PackageOverride {\n name: string;\n versionRequirement: string;\n isInternal?: boolean;\n overrides: PackageJson;\n}\n"]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { PackageJsonExports } from './PackageJson.js';
|
|
2
|
+
/**
|
|
3
|
+
* Settings which apply to a single package (app or library) as it pertains to the Cloudpack start experience.
|
|
4
|
+
*/
|
|
5
|
+
export interface PackageSettings {
|
|
6
|
+
/**
|
|
7
|
+
* A match to indicate the target for the settings to be applied to.
|
|
8
|
+
*/
|
|
9
|
+
match: {
|
|
10
|
+
/**
|
|
11
|
+
* Name of the package. Can use a trailing wildcard (e.g. "\@scope/*").
|
|
12
|
+
*/
|
|
13
|
+
name: string;
|
|
14
|
+
/**
|
|
15
|
+
* Version of the package. Unspecified matches any version.
|
|
16
|
+
*/
|
|
17
|
+
version?: string;
|
|
18
|
+
} | string;
|
|
19
|
+
/**
|
|
20
|
+
* The dependencies which should be included when computing the import map. This is primarily used when
|
|
21
|
+
* devDependencies are needed by the app. This often happens when a library has a demo app which relies
|
|
22
|
+
* on devDependencies.
|
|
23
|
+
*/
|
|
24
|
+
includedDependencies?: string[];
|
|
25
|
+
/**
|
|
26
|
+
* The dependencies which should be ignored by Cloudpack verbs. For example, if "react-native" is a dependency
|
|
27
|
+
* which should not be included in the import map or evaluated during `init`, it can be listed here to ignore it.
|
|
28
|
+
*/
|
|
29
|
+
excludedDependencies?: string[];
|
|
30
|
+
/**
|
|
31
|
+
* Dependencies which should be inlined in the library bundled by Cloudpack. This is useful for libraries which
|
|
32
|
+
* are small and don't need to be loaded separately, or ones which have issues being resolved by the browser.
|
|
33
|
+
*/
|
|
34
|
+
inlinedDependencies?: string[];
|
|
35
|
+
/**
|
|
36
|
+
* The exports map that should be used for this package, ignoring entries which are defined in the original
|
|
37
|
+
* package.json. This is useful for libraries which have a missing or broken exports map, or when we want to
|
|
38
|
+
* trim the exports to reduce the api surface we expose to the inner loop experience.
|
|
39
|
+
*/
|
|
40
|
+
exports?: PackageJsonExports;
|
|
41
|
+
/**
|
|
42
|
+
* Forces the package to be bundled using a specific bundler.
|
|
43
|
+
*/
|
|
44
|
+
bundlerType?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Options to pass to the bundler.
|
|
47
|
+
*/
|
|
48
|
+
bundlerOptions?: Record<string, unknown>;
|
|
49
|
+
/**
|
|
50
|
+
* Paths used for file monitoring and input hashing. Supports glob matching.
|
|
51
|
+
* Defaults to `[/src/**, *.json]` and excludes node_modules.
|
|
52
|
+
* Use `...` to include the default paths.
|
|
53
|
+
*/
|
|
54
|
+
inputPaths?: string[];
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=PackageSettings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PackageSettings.d.ts","sourceRoot":"","sources":["../src/PackageSettings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,KAAK,EACD;QACE;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,GAED,MAAM,CAAC;IAEX;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE/B;;;;OAIG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAE7B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEzC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PackageSettings.js","sourceRoot":"","sources":["../src/PackageSettings.ts"],"names":[],"mappings":"","sourcesContent":["import type { PackageJsonExports } from './PackageJson.js';\n\n/**\n * Settings which apply to a single package (app or library) as it pertains to the Cloudpack start experience.\n */\nexport interface PackageSettings {\n /**\n * A match to indicate the target for the settings to be applied to.\n */\n match:\n | {\n /**\n * Name of the package. Can use a trailing wildcard (e.g. \"\\@scope/*\").\n */\n name: string;\n\n /**\n * Version of the package. Unspecified matches any version.\n */\n version?: string;\n }\n // Match can be a string, which is a shortcut for the name.\n | string;\n\n /**\n * The dependencies which should be included when computing the import map. This is primarily used when\n * devDependencies are needed by the app. This often happens when a library has a demo app which relies\n * on devDependencies.\n */\n includedDependencies?: string[];\n\n /**\n * The dependencies which should be ignored by Cloudpack verbs. For example, if \"react-native\" is a dependency\n * which should not be included in the import map or evaluated during `init`, it can be listed here to ignore it.\n */\n excludedDependencies?: string[];\n\n /**\n * Dependencies which should be inlined in the library bundled by Cloudpack. This is useful for libraries which\n * are small and don't need to be loaded separately, or ones which have issues being resolved by the browser.\n */\n inlinedDependencies?: string[];\n\n /**\n * The exports map that should be used for this package, ignoring entries which are defined in the original\n * package.json. This is useful for libraries which have a missing or broken exports map, or when we want to\n * trim the exports to reduce the api surface we expose to the inner loop experience.\n */\n exports?: PackageJsonExports;\n\n /**\n * Forces the package to be bundled using a specific bundler.\n */\n bundlerType?: string;\n\n /**\n * Options to pass to the bundler.\n */\n bundlerOptions?: Record<string, unknown>;\n\n /**\n * Paths used for file monitoring and input hashing. Supports glob matching.\n * Defaults to `[/src/**, *.json]` and excludes node_modules.\n * Use `...` to include the default paths.\n */\n inputPaths?: string[];\n}\n"]}
|
package/lib/Route.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface Route {
|
|
2
|
+
/**
|
|
3
|
+
* The url path part to match. Start paths with a leading slash, e.g. `'/my-route'`. You can also
|
|
4
|
+
* use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.
|
|
5
|
+
*/
|
|
6
|
+
match: string;
|
|
7
|
+
/**
|
|
8
|
+
* The path relative to the app root to static assets. If this is provided, renderScript/exportEntry
|
|
9
|
+
* will be ignored.
|
|
10
|
+
*/
|
|
11
|
+
staticPath?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Path to a .js or .html file used for rendering the route. If a script is provided, it must
|
|
14
|
+
* export a default function implementing `CreateHtmlFunction` defined in `@ms-cloudpack/cli`.
|
|
15
|
+
*/
|
|
16
|
+
renderScript?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The key in the exports map which represents the entry point app script for this route.
|
|
19
|
+
* Default is '.', meaning the main package export key.
|
|
20
|
+
*/
|
|
21
|
+
exportEntry?: string;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=Route.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Route.d.ts","sourceRoot":"","sources":["../src/Route.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
package/lib/Route.js
ADDED
package/lib/Route.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Route.js","sourceRoot":"","sources":["../src/Route.ts"],"names":[],"mappings":"","sourcesContent":["export interface Route {\n /**\n * The url path part to match. Start paths with a leading slash, e.g. `'/my-route'`. You can also\n * use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.\n */\n match: string;\n\n /**\n * The path relative to the app root to static assets. If this is provided, renderScript/exportEntry\n * will be ignored.\n */\n staticPath?: string;\n\n /**\n * Path to a .js or .html file used for rendering the route. If a script is provided, it must\n * export a default function implementing `CreateHtmlFunction` defined in `@ms-cloudpack/cli`.\n */\n renderScript?: string;\n\n /**\n * The key in the exports map which represents the entry point app script for this route.\n * Default is '.', meaning the main package export key.\n */\n exportEntry?: string;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TelemetryConfig.d.ts","sourceRoot":"","sources":["../src/TelemetryConfig.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TelemetryConfig.js","sourceRoot":"","sources":["../src/TelemetryConfig.ts"],"names":[],"mappings":"","sourcesContent":["export interface TelemetryConfig {\n /**\n * Application Insights connection string.\n */\n connectionString: string;\n}\n"]}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { DevServer } from './DevServer.js';
|
|
2
|
+
import type { Features } from './Features.js';
|
|
3
|
+
import type { PackageSettings } from './PackageSettings.js';
|
|
4
|
+
import type { TelemetryConfig } from './TelemetryConfig.js';
|
|
5
|
+
/**
|
|
6
|
+
* Per-application user-provided configuration for Cloudpack.
|
|
7
|
+
*/
|
|
8
|
+
export interface UserConfig {
|
|
9
|
+
/**
|
|
10
|
+
* Extend the configuration from another file: either an import path or a relative path
|
|
11
|
+
* (resolved from the config file's location).
|
|
12
|
+
*
|
|
13
|
+
* If an array, later files will take precedence when merging.
|
|
14
|
+
* (The user config always takes precedence over any extended config.)
|
|
15
|
+
*
|
|
16
|
+
* Config merging approach:
|
|
17
|
+
* - Objects will be deeply merged.
|
|
18
|
+
* - Primitive values will be overwritten.
|
|
19
|
+
* - Arrays will be overwritten, EXCEPT for `packageSettings`, which will be concatenated.
|
|
20
|
+
*/
|
|
21
|
+
extends?: string | string[];
|
|
22
|
+
/**
|
|
23
|
+
* A set of options for configuring how the dev server works.
|
|
24
|
+
*/
|
|
25
|
+
devServer?: DevServer;
|
|
26
|
+
/**
|
|
27
|
+
* A set of options for configuring telemetry
|
|
28
|
+
*/
|
|
29
|
+
telemetry?: TelemetryConfig;
|
|
30
|
+
/**
|
|
31
|
+
* A set of options for configuring the experience. Features can be set to true to change the default
|
|
32
|
+
* behavior.
|
|
33
|
+
*/
|
|
34
|
+
features?: Features;
|
|
35
|
+
/**
|
|
36
|
+
* Help message to display when Cloudpack starts up.
|
|
37
|
+
*/
|
|
38
|
+
helpMessage?: string;
|
|
39
|
+
/**
|
|
40
|
+
* An array of PackageSettings objects, used to provide settings for how we bundle packages.
|
|
41
|
+
*/
|
|
42
|
+
packageSettings?: PackageSettings[];
|
|
43
|
+
/**
|
|
44
|
+
* An optional list of commands (followed by a string array of args for that command)
|
|
45
|
+
* to be executed prior to Cloudpack bundle
|
|
46
|
+
*/
|
|
47
|
+
dependsOn?: [string, string[]][];
|
|
48
|
+
/**
|
|
49
|
+
* Glob pattern to match `patch-package` patch files, relative to the project root
|
|
50
|
+
* (usually the same as the repository root).
|
|
51
|
+
* @default "patches/*.patch"
|
|
52
|
+
*/
|
|
53
|
+
patchFilesGlobPattern?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Azure Blob Storage configuration for remote cache - uploading and downloading packages.
|
|
56
|
+
* If this is not provided, the remote cache will not be used.
|
|
57
|
+
*/
|
|
58
|
+
remoteCache?: {
|
|
59
|
+
/**
|
|
60
|
+
* The name of the Azure Blob Storage account.
|
|
61
|
+
*/
|
|
62
|
+
storageAccount: string;
|
|
63
|
+
/**
|
|
64
|
+
* The name of the container to use for the remote cache. Container must already exist.
|
|
65
|
+
*/
|
|
66
|
+
container: string;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* A list of package names that should never be excluded or included from the bundle.
|
|
70
|
+
*/
|
|
71
|
+
neverExcludeDependencies?: string[];
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=UserConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserConfig.d.ts","sourceRoot":"","sources":["../src/UserConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE5B;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;IAE5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,eAAe,CAAC,EAAE,eAAe,EAAE,CAAC;IAEpC;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;IAEjC;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B;;;OAGG;IACH,WAAW,CAAC,EAAE;QACZ;;WAEG;QACH,cAAc,EAAE,MAAM,CAAC;QACvB;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IAEF;;OAEG;IACH,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;CACrC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserConfig.js","sourceRoot":"","sources":["../src/UserConfig.ts"],"names":[],"mappings":"","sourcesContent":["import type { DevServer } from './DevServer.js';\nimport type { Features } from './Features.js';\nimport type { PackageSettings } from './PackageSettings.js';\nimport type { TelemetryConfig } from './TelemetryConfig.js';\n\n/**\n * Per-application user-provided configuration for Cloudpack.\n */\nexport interface UserConfig {\n /**\n * Extend the configuration from another file: either an import path or a relative path\n * (resolved from the config file's location).\n *\n * If an array, later files will take precedence when merging.\n * (The user config always takes precedence over any extended config.)\n *\n * Config merging approach:\n * - Objects will be deeply merged.\n * - Primitive values will be overwritten.\n * - Arrays will be overwritten, EXCEPT for `packageSettings`, which will be concatenated.\n */\n extends?: string | string[];\n\n /**\n * A set of options for configuring how the dev server works.\n */\n devServer?: DevServer;\n\n /**\n * A set of options for configuring telemetry\n */\n telemetry?: TelemetryConfig;\n\n /**\n * A set of options for configuring the experience. Features can be set to true to change the default\n * behavior.\n */\n features?: Features;\n\n /**\n * Help message to display when Cloudpack starts up.\n */\n helpMessage?: string;\n\n /**\n * An array of PackageSettings objects, used to provide settings for how we bundle packages.\n */\n packageSettings?: PackageSettings[];\n\n /**\n * An optional list of commands (followed by a string array of args for that command)\n * to be executed prior to Cloudpack bundle\n */\n dependsOn?: [string, string[]][];\n\n /**\n * Glob pattern to match `patch-package` patch files, relative to the project root\n * (usually the same as the repository root).\n * @default \"patches/*.patch\"\n */\n patchFilesGlobPattern?: string;\n\n /**\n * Azure Blob Storage configuration for remote cache - uploading and downloading packages.\n * If this is not provided, the remote cache will not be used.\n */\n remoteCache?: {\n /**\n * The name of the Azure Blob Storage account.\n */\n storageAccount: string;\n /**\n * The name of the container to use for the remote cache. Container must already exist.\n */\n container: string;\n };\n\n /**\n * A list of package names that should never be excluded or included from the bundle.\n */\n neverExcludeDependencies?: string[];\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Feature } from './Feature.js';
|
|
2
|
+
/**
|
|
3
|
+
* A set of options for configuring the experience. Features can be set to true to change the default
|
|
4
|
+
* behavior.
|
|
5
|
+
*/
|
|
6
|
+
export declare const allFeatures: {
|
|
7
|
+
disableSourceMaps: Feature;
|
|
8
|
+
enqueueDependencies: Feature;
|
|
9
|
+
enableLage: Feature;
|
|
10
|
+
resolveWebExtensions: Feature;
|
|
11
|
+
optimizeDependencies: Feature;
|
|
12
|
+
verifyExports: Feature;
|
|
13
|
+
syncBundles: Feature;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=allFeatures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"allFeatures.d.ts","sourceRoot":"","sources":["../src/allFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;;;CAWvB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A set of options for configuring the experience. Features can be set to true to change the default
|
|
3
|
+
* behavior.
|
|
4
|
+
*/
|
|
5
|
+
export const allFeatures = {
|
|
6
|
+
disableSourceMaps: { description: 'Disables the generation of source-maps during build.' },
|
|
7
|
+
enqueueDependencies: { description: 'Enables the preemptive enqueueing of dependencies during build.' },
|
|
8
|
+
enableLage: { description: 'Enables the use of lage for running tasks.' },
|
|
9
|
+
resolveWebExtensions: { description: 'Enables React Native type resolution of .web.ts extensions.' },
|
|
10
|
+
optimizeDependencies: {
|
|
11
|
+
description: 'Excludes unused dependencies in the generated config during an init run. This helps trim the dependency graph, reduce the import map, and speed up performance.',
|
|
12
|
+
},
|
|
13
|
+
verifyExports: { description: 'Enables the verification of exports during init.' },
|
|
14
|
+
syncBundles: { description: 'Enables the syncing of bundles.' },
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=allFeatures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"allFeatures.js","sourceRoot":"","sources":["../src/allFeatures.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,iBAAiB,EAAE,EAAE,WAAW,EAAE,sDAAsD,EAAa;IACrG,mBAAmB,EAAE,EAAE,WAAW,EAAE,iEAAiE,EAAa;IAClH,UAAU,EAAE,EAAE,WAAW,EAAE,4CAA4C,EAAa;IACpF,oBAAoB,EAAE,EAAE,WAAW,EAAE,6DAA6D,EAAa;IAC/G,oBAAoB,EAAE;QACpB,WAAW,EACT,iKAAiK;KACzJ;IACZ,aAAa,EAAE,EAAE,WAAW,EAAE,kDAAkD,EAAa;IAC7F,WAAW,EAAE,EAAE,WAAW,EAAE,iCAAiC,EAAa;CAC3E,CAAC","sourcesContent":["import type { Feature } from './Feature.js';\n\n/**\n * A set of options for configuring the experience. Features can be set to true to change the default\n * behavior.\n */\nexport const allFeatures = {\n disableSourceMaps: { description: 'Disables the generation of source-maps during build.' } as Feature,\n enqueueDependencies: { description: 'Enables the preemptive enqueueing of dependencies during build.' } as Feature,\n enableLage: { description: 'Enables the use of lage for running tasks.' } as Feature,\n resolveWebExtensions: { description: 'Enables React Native type resolution of .web.ts extensions.' } as Feature,\n optimizeDependencies: {\n description:\n 'Excludes unused dependencies in the generated config during an init run. This helps trim the dependency graph, reduce the import map, and speed up performance.',\n } as Feature,\n verifyExports: { description: 'Enables the verification of exports during init.' } as Feature,\n syncBundles: { description: 'Enables the syncing of bundles.' } as Feature,\n};\n"]}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export { allFeatures } from './allFeatures.js';
|
|
2
|
+
export type { GetPackageDefinitionOptions, PackageDefinitionTransform, PackageDefinitionsCache, PackageImporterContext, } from './PackageDefinitionsCache.js';
|
|
3
|
+
export type { LiteralOrString, PackageJson, PackageJsonDependencies, PackageJsonExportCondition, PackageJsonExports, PackageJsonExportsObject, PackageJsonExportsValue, PackageJsonImports, } from './PackageJson.js';
|
|
4
|
+
export type { BundleContext } from './BundleContext.js';
|
|
5
|
+
export type { BundleMessage } from './BundleMessage.js';
|
|
6
|
+
export type { BundleMessageLocation } from './BundleMessageLocation.js';
|
|
7
|
+
export type { BundleMessageNote } from './BundleMessageNote.js';
|
|
8
|
+
export type { BundleOptions } from './BundleOptions.js';
|
|
9
|
+
export type { BundleOutputFile } from './BundleOutputFile.js';
|
|
10
|
+
export type { BundleResult } from './BundleResult.js';
|
|
11
|
+
export type { BundlerPluginResult } from './BundlerPluginResult.js';
|
|
12
|
+
export type { BundlerPlugin } from './BundlerPlugin.js';
|
|
13
|
+
export type { CloudpackConfig } from './CloudpackConfig.js';
|
|
14
|
+
export type { DevServer } from './DevServer.js';
|
|
15
|
+
export type { Feature } from './Feature.js';
|
|
16
|
+
export type { Features } from './Features.js';
|
|
17
|
+
export type { GeneratedConfig } from './GeneratedConfig.js';
|
|
18
|
+
export type { HttpsConfig } from './HttpsConfig.js';
|
|
19
|
+
export type { PackageOverride } from './PackageOverride.js';
|
|
20
|
+
export type { PackageSettings } from './PackageSettings.js';
|
|
21
|
+
export type { Route } from './Route.js';
|
|
22
|
+
export type { TelemetryConfig } from './TelemetryConfig.js';
|
|
23
|
+
export type { UserConfig } from './UserConfig.js';
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,YAAY,EACV,2BAA2B,EAC3B,0BAA0B,EAC1B,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,eAAe,EACf,WAAW,EACX,uBAAuB,EACvB,0BAA0B,EAC1B,kBAAkB,EAClB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,YAAY,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,YAAY,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
|
package/lib/index.js
ADDED
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["export { allFeatures } from './allFeatures.js';\nexport type {\n GetPackageDefinitionOptions,\n PackageDefinitionTransform,\n PackageDefinitionsCache,\n PackageImporterContext,\n} from './PackageDefinitionsCache.js';\nexport type {\n LiteralOrString,\n PackageJson,\n PackageJsonDependencies,\n PackageJsonExportCondition,\n PackageJsonExports,\n PackageJsonExportsObject,\n PackageJsonExportsValue,\n PackageJsonImports,\n} from './PackageJson.js';\nexport type { BundleContext } from './BundleContext.js';\nexport type { BundleMessage } from './BundleMessage.js';\nexport type { BundleMessageLocation } from './BundleMessageLocation.js';\nexport type { BundleMessageNote } from './BundleMessageNote.js';\nexport type { BundleOptions } from './BundleOptions.js';\nexport type { BundleOutputFile } from './BundleOutputFile.js';\nexport type { BundleResult } from './BundleResult.js';\nexport type { BundlerPluginResult } from './BundlerPluginResult.js';\nexport type { BundlerPlugin } from './BundlerPlugin.js';\nexport type { CloudpackConfig } from './CloudpackConfig.js';\nexport type { DevServer } from './DevServer.js';\nexport type { Feature } from './Feature.js';\nexport type { Features } from './Features.js';\nexport type { GeneratedConfig } from './GeneratedConfig.js';\nexport type { HttpsConfig } from './HttpsConfig.js';\nexport type { PackageOverride } from './PackageOverride.js';\nexport type { PackageSettings } from './PackageSettings.js';\nexport type { Route } from './Route.js';\nexport type { TelemetryConfig } from './TelemetryConfig.js';\nexport type { UserConfig } from './UserConfig.js';\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
+
{
|
|
4
|
+
"tsdocVersion": "0.12",
|
|
5
|
+
"toolPackages": [
|
|
6
|
+
{
|
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
|
8
|
+
"packageVersion": "7.39.4"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ms-cloudpack/common-types",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Common types for Cloudpack.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"types": "./lib/index.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"source": "./src/index.ts",
|
|
12
|
+
"types": "./lib/index.d.ts",
|
|
13
|
+
"import": "./lib/index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@ms-cloudpack/eslint-plugin-internal": "^0.0.1",
|
|
18
|
+
"@ms-cloudpack/scripts": "^0.0.1"
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"api": "cloudpack-scripts api",
|
|
22
|
+
"build:watch": "cloudpack-scripts build-watch",
|
|
23
|
+
"build": "cloudpack-scripts build && yarn schema",
|
|
24
|
+
"lint:update": "cloudpack-scripts lint-update",
|
|
25
|
+
"lint": "cloudpack-scripts lint",
|
|
26
|
+
"schema": "cloudpack-scripts schema"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"lib/**/!(*.test.*)",
|
|
30
|
+
"schema"
|
|
31
|
+
]
|
|
32
|
+
}
|