@trackunit/iris-app-api 1.15.0 → 1.15.2-alpha-c2a1dc6c53b.0
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/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export * from "./types/irisAppExtensionManifest";
|
|
|
18
18
|
export * from "./types/irisAppInstallationConfig";
|
|
19
19
|
export * from "./types/irisAppManifest";
|
|
20
20
|
export * from "./types/irisAppMarketplace";
|
|
21
|
+
export * from "./types/loadNxRootPackageJson";
|
|
21
22
|
export * from "./types/modulefederation";
|
|
22
23
|
export * from "./types/permissionsPolicy";
|
|
23
24
|
export * from "./types/scopes";
|
package/src/index.js
CHANGED
|
@@ -21,6 +21,7 @@ tslib_1.__exportStar(require("./types/irisAppExtensionManifest"), exports);
|
|
|
21
21
|
tslib_1.__exportStar(require("./types/irisAppInstallationConfig"), exports);
|
|
22
22
|
tslib_1.__exportStar(require("./types/irisAppManifest"), exports);
|
|
23
23
|
tslib_1.__exportStar(require("./types/irisAppMarketplace"), exports);
|
|
24
|
+
tslib_1.__exportStar(require("./types/loadNxRootPackageJson"), exports);
|
|
24
25
|
tslib_1.__exportStar(require("./types/modulefederation"), exports);
|
|
25
26
|
tslib_1.__exportStar(require("./types/permissionsPolicy"), exports);
|
|
26
27
|
tslib_1.__exportStar(require("./types/scopes"), exports);
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/iris-app-sdk/iris-app-api/src/index.ts"],"names":[],"mappings":";;;AAAA,oEAA0C;AAC1C,oFAA0D;AAC1D,iGAAuE;AACvE,wFAA8D;AAC9D,2FAAiE;AACjE,oFAA0D;AAC1D,8FAAoE;AACpE,wFAA8D;AAC9D,qFAA2D;AAC3D,4FAAkE;AAClE,uFAA6D;AAC7D,qFAA2D;AAC3D,4DAAkC;AAClC,kEAAwC;AACxC,kEAAwC;AACxC,sEAA4C;AAC5C,2EAAiD;AACjD,4EAAkD;AAClD,kEAAwC;AACxC,qEAA2C;AAC3C,mEAAyC;AACzC,oEAA0C;AAC1C,yDAA+B;AAC/B,uEAA6C;AAC7C,uEAA6C","sourcesContent":["export * from \"./types/defaultValidHosts\";\nexport * from \"./types/extensions/adminExtensionManifest\";\nexport * from \"./types/extensions/assetEventsActionsExtensionManifest\";\nexport * from \"./types/extensions/assetHomeExtensionManifest\";\nexport * from \"./types/extensions/customerHomeExtensionManifest\";\nexport * from \"./types/extensions/fleetExtensionManifest\";\nexport * from \"./types/extensions/irisAppSettingsExtensionManifest\";\nexport * from \"./types/extensions/lifecycleExtensionManifest\";\nexport * from \"./types/extensions/reportExtensionManifest\";\nexport * from \"./types/extensions/serversideApiExtensionManifest\";\nexport * from \"./types/extensions/siteHomeExtensionManifest\";\nexport * from \"./types/extensions/widgetExtensionManifest\";\nexport * from \"./types/iconImage\";\nexport * from \"./types/icons.generated\";\nexport * from \"./types/irisAppCspInput\";\nexport * from \"./types/irisAppCustomFields\";\nexport * from \"./types/irisAppExtensionManifest\";\nexport * from \"./types/irisAppInstallationConfig\";\nexport * from \"./types/irisAppManifest\";\nexport * from \"./types/irisAppMarketplace\";\nexport * from \"./types/modulefederation\";\nexport * from \"./types/permissionsPolicy\";\nexport * from \"./types/scopes\";\nexport * from \"./types/serversideInterfaces\";\nexport * from \"./types/subscriptionPackages\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/iris-app-sdk/iris-app-api/src/index.ts"],"names":[],"mappings":";;;AAAA,oEAA0C;AAC1C,oFAA0D;AAC1D,iGAAuE;AACvE,wFAA8D;AAC9D,2FAAiE;AACjE,oFAA0D;AAC1D,8FAAoE;AACpE,wFAA8D;AAC9D,qFAA2D;AAC3D,4FAAkE;AAClE,uFAA6D;AAC7D,qFAA2D;AAC3D,4DAAkC;AAClC,kEAAwC;AACxC,kEAAwC;AACxC,sEAA4C;AAC5C,2EAAiD;AACjD,4EAAkD;AAClD,kEAAwC;AACxC,qEAA2C;AAC3C,wEAA8C;AAC9C,mEAAyC;AACzC,oEAA0C;AAC1C,yDAA+B;AAC/B,uEAA6C;AAC7C,uEAA6C","sourcesContent":["export * from \"./types/defaultValidHosts\";\nexport * from \"./types/extensions/adminExtensionManifest\";\nexport * from \"./types/extensions/assetEventsActionsExtensionManifest\";\nexport * from \"./types/extensions/assetHomeExtensionManifest\";\nexport * from \"./types/extensions/customerHomeExtensionManifest\";\nexport * from \"./types/extensions/fleetExtensionManifest\";\nexport * from \"./types/extensions/irisAppSettingsExtensionManifest\";\nexport * from \"./types/extensions/lifecycleExtensionManifest\";\nexport * from \"./types/extensions/reportExtensionManifest\";\nexport * from \"./types/extensions/serversideApiExtensionManifest\";\nexport * from \"./types/extensions/siteHomeExtensionManifest\";\nexport * from \"./types/extensions/widgetExtensionManifest\";\nexport * from \"./types/iconImage\";\nexport * from \"./types/icons.generated\";\nexport * from \"./types/irisAppCspInput\";\nexport * from \"./types/irisAppCustomFields\";\nexport * from \"./types/irisAppExtensionManifest\";\nexport * from \"./types/irisAppInstallationConfig\";\nexport * from \"./types/irisAppManifest\";\nexport * from \"./types/irisAppMarketplace\";\nexport * from \"./types/loadNxRootPackageJson\";\nexport * from \"./types/modulefederation\";\nexport * from \"./types/permissionsPolicy\";\nexport * from \"./types/scopes\";\nexport * from \"./types/serversideInterfaces\";\nexport * from \"./types/subscriptionPackages\";\n\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type PackageJson = {
|
|
2
|
+
name: string;
|
|
3
|
+
dependencies: Record<string, string>;
|
|
4
|
+
devDependencies: Record<string, string>;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Get the package.json of the root of the NX workspace
|
|
8
|
+
*
|
|
9
|
+
* @param pathToNxRoot - The path to the root of the NX workspace
|
|
10
|
+
* @returns {PackageJson} The package.json of the root of the NX workspace
|
|
11
|
+
*/
|
|
12
|
+
export declare const loadNxRootPackageJson: (pathToNxRoot: string) => PackageJson;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loadNxRootPackageJson = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Get the package.json of the root of the NX workspace
|
|
6
|
+
*
|
|
7
|
+
* @param pathToNxRoot - The path to the root of the NX workspace
|
|
8
|
+
* @returns {PackageJson} The package.json of the root of the NX workspace
|
|
9
|
+
*/
|
|
10
|
+
const loadNxRootPackageJson = (pathToNxRoot) => {
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
12
|
+
const fs = require("fs");
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
14
|
+
const path = require("path");
|
|
15
|
+
const pathToPackageJsonPath = path.join(pathToNxRoot, "package.json");
|
|
16
|
+
if (!Boolean(fs.existsSync(pathToPackageJsonPath))) {
|
|
17
|
+
throw new Error(`Package.json not found at ${pathToPackageJsonPath}, make sure to pass the path to the root of the NX workspace`);
|
|
18
|
+
}
|
|
19
|
+
const packageJson = JSON.parse(fs.readFileSync(pathToPackageJsonPath, "utf-8"));
|
|
20
|
+
if (!Boolean(packageJson.dependencies)) {
|
|
21
|
+
packageJson.dependencies = {};
|
|
22
|
+
}
|
|
23
|
+
if (!Boolean(packageJson.devDependencies)) {
|
|
24
|
+
packageJson.devDependencies = {};
|
|
25
|
+
}
|
|
26
|
+
if (!Boolean(packageJson.name)) {
|
|
27
|
+
packageJson.name = "unknown-name";
|
|
28
|
+
}
|
|
29
|
+
// eslint-disable-next-line @trackunit/no-typescript-assertion
|
|
30
|
+
return packageJson;
|
|
31
|
+
};
|
|
32
|
+
exports.loadNxRootPackageJson = loadNxRootPackageJson;
|
|
33
|
+
//# sourceMappingURL=loadNxRootPackageJson.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadNxRootPackageJson.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-api/src/types/loadNxRootPackageJson.ts"],"names":[],"mappings":";;;AAOA;;;;;GAKG;AACI,MAAM,qBAAqB,GAAG,CAAC,YAAoB,EAAe,EAAE;IACzE,iEAAiE;IACjE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzB,iEAAiE;IACjE,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7B,MAAM,qBAAqB,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;IAEtE,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC,EAAE,CAAC;QACnD,MAAM,IAAI,KAAK,CACb,6BAA6B,qBAAqB,8DAA8D,CACjH,CAAC;IACJ,CAAC;IAED,MAAM,WAAW,GAAgE,IAAI,CAAC,KAAK,CACzF,EAAE,CAAC,YAAY,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAChD,CAAC;IACF,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC,EAAE,CAAC;QACvC,WAAW,CAAC,YAAY,GAAG,EAAE,CAAC;IAChC,CAAC;IACD,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,eAAe,CAAC,EAAE,CAAC;QAC1C,WAAW,CAAC,eAAe,GAAG,EAAE,CAAC;IACnC,CAAC;IACD,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC;QAC/B,WAAW,CAAC,IAAI,GAAG,cAAc,CAAC;IACpC,CAAC;IACD,8DAA8D;IAC9D,OAAO,WAAqC,CAAC;AAC/C,CAAC,CAAC;AA3BW,QAAA,qBAAqB,yBA2BhC","sourcesContent":["\ntype PackageJson = {\n name: string;\n dependencies: Record<string, string>;\n devDependencies: Record<string, string>;\n};\n\n/**\n * Get the package.json of the root of the NX workspace\n *\n * @param pathToNxRoot - The path to the root of the NX workspace\n * @returns {PackageJson} The package.json of the root of the NX workspace\n */\nexport const loadNxRootPackageJson = (pathToNxRoot: string): PackageJson => {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const fs = require(\"fs\");\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const path = require(\"path\");\n const pathToPackageJsonPath = path.join(pathToNxRoot, \"package.json\");\n\n if (!Boolean(fs.existsSync(pathToPackageJsonPath))) {\n throw new Error(\n `Package.json not found at ${pathToPackageJsonPath}, make sure to pass the path to the root of the NX workspace`\n );\n }\n\n const packageJson: Record<string, string | Record<string, string> | undefined> = JSON.parse(\n fs.readFileSync(pathToPackageJsonPath, \"utf-8\")\n );\n if (!Boolean(packageJson.dependencies)) {\n packageJson.dependencies = {};\n }\n if (!Boolean(packageJson.devDependencies)) {\n packageJson.devDependencies = {};\n }\n if (!Boolean(packageJson.name)) {\n packageJson.name = \"unknown-name\";\n }\n // eslint-disable-next-line @trackunit/no-typescript-assertion\n return packageJson as unknown as PackageJson;\n};\n"]}
|