@cloud-copilot/iam-data 0.2.202408311 → 0.2.202408312
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 +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.d.ts.map +1 -1
- package/dist/cjs/version.js +4 -9
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.d.ts.map +1 -1
- package/dist/esm/version.js +3 -8
- package/dist/esm/version.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -47,4 +47,4 @@ for(const serviceKey of iamServiceKeys()) {
|
|
|
47
47
|
### Version Info
|
|
48
48
|
The version is numper is formatted as `major.minor.updatedAt`. The updatedAt is the date the data was last updated in the format `YYYYMMDDX` where `X` is a counter to enable deploying more than once per day if necessary. For example version `0.1.202408291` has data updated on August 29th, 2024.
|
|
49
49
|
|
|
50
|
-
The version can be accessed using the `
|
|
50
|
+
The version can be accessed using the `iamDataVersion()` method.
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAQvC"}
|
package/dist/cjs/version.js
CHANGED
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const
|
|
5
|
-
const path_1 = require("path");
|
|
3
|
+
exports.iamDataVersion = iamDataVersion;
|
|
4
|
+
const readRelativeFile_js_1 = require("./readRelativeFile.js");
|
|
6
5
|
let versionCache = undefined;
|
|
7
6
|
/**
|
|
8
7
|
* Get the version of the package
|
|
9
8
|
*/
|
|
10
|
-
function
|
|
9
|
+
function iamDataVersion() {
|
|
11
10
|
if (!versionCache) {
|
|
12
|
-
|
|
13
|
-
if (__dirname.endsWith('src')) {
|
|
14
|
-
fileRoot = (0, path_1.join)(__dirname, '..');
|
|
15
|
-
}
|
|
16
|
-
const data = (0, fs_1.readFileSync)((0, path_1.join)(fileRoot, 'package.json'), 'utf8');
|
|
11
|
+
const data = (0, readRelativeFile_js_1.readRelativeFile)(['package.json']);
|
|
17
12
|
const packageInfo = JSON.parse(data);
|
|
18
13
|
versionCache = packageInfo.version;
|
|
19
14
|
}
|
package/dist/cjs/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";;AAOA,wCAQC;AAfD,+DAAyD;AAEzD,IAAI,YAAY,GAAuB,SAAS,CAAC;AAEjD;;GAEG;AACH,SAAgB,cAAc;IAC5B,IAAG,CAAC,YAAY,EAAE,CAAC;QACjB,MAAM,IAAI,GAAG,IAAA,sCAAgB,EAAC,CAAC,cAAc,CAAC,CAAC,CAAC;QAChD,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACrC,YAAY,GAAG,WAAW,CAAC,OAAO,CAAC;IACrC,CAAC;IAED,OAAO,YAAa,CAAA;AACtB,CAAC"}
|
package/dist/esm/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAQvC"}
|
package/dist/esm/version.js
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { join } from "path";
|
|
1
|
+
import { readRelativeFile } from "./readRelativeFile.js";
|
|
3
2
|
let versionCache = undefined;
|
|
4
3
|
/**
|
|
5
4
|
* Get the version of the package
|
|
6
5
|
*/
|
|
7
|
-
export function
|
|
6
|
+
export function iamDataVersion() {
|
|
8
7
|
if (!versionCache) {
|
|
9
|
-
|
|
10
|
-
if (__dirname.endsWith('src')) {
|
|
11
|
-
fileRoot = join(__dirname, '..');
|
|
12
|
-
}
|
|
13
|
-
const data = readFileSync(join(fileRoot, 'package.json'), 'utf8');
|
|
8
|
+
const data = readRelativeFile(['package.json']);
|
|
14
9
|
const packageInfo = JSON.parse(data);
|
|
15
10
|
versionCache = packageInfo.version;
|
|
16
11
|
}
|
package/dist/esm/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,IAAI,YAAY,GAAuB,SAAS,CAAC;AAEjD;;GAEG;AACH,MAAM,UAAU,cAAc;IAC5B,IAAG,CAAC,YAAY,EAAE,CAAC;QACjB,MAAM,IAAI,GAAG,gBAAgB,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC;QAChD,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACrC,YAAY,GAAG,WAAW,CAAC,OAAO,CAAC;IACrC,CAAC;IAED,OAAO,YAAa,CAAA;AACtB,CAAC"}
|