@mikarinneoracle/oci-cdk 1.0.3 → 1.0.4
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.
Potentially problematic release.
This version of @mikarinneoracle/oci-cdk might be problematic. Click here for more details.
- package/bin/build-if-needed.js +15 -0
- package/package.json +4 -3
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Run tsc only if lib is not already built (e.g. when package is used from npm as pre-built).
|
|
4
|
+
* Uses __dirname so the check is relative to the package root, not process.cwd().
|
|
5
|
+
*/
|
|
6
|
+
const fs = require('fs');
|
|
7
|
+
const path = require('path');
|
|
8
|
+
const { execSync } = require('child_process');
|
|
9
|
+
|
|
10
|
+
const pkgRoot = path.join(__dirname, '..');
|
|
11
|
+
const prebuilt = path.join(pkgRoot, 'lib', 'oci-stack.js');
|
|
12
|
+
if (fs.existsSync(prebuilt)) {
|
|
13
|
+
process.exit(0);
|
|
14
|
+
}
|
|
15
|
+
execSync('tsc', { stdio: 'inherit', cwd: pkgRoot });
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikarinneoracle/oci-cdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "OCI CDK stack for OCI Functions, API Gateway, and related infrastructure",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"ocdk": "./bin/ocdk.js"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
|
-
"build": "node
|
|
10
|
+
"build": "node bin/build-if-needed.js",
|
|
11
11
|
"compile": "tsc",
|
|
12
12
|
"watch": "tsc -w",
|
|
13
13
|
"test": "jest",
|
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
},
|
|
36
36
|
"bugs": { "url": "https://github.com/mikarinneoracle/ocdk/issues" },
|
|
37
37
|
"homepage": "https://github.com/mikarinneoracle/ocdk#readme",
|
|
38
|
-
"
|
|
38
|
+
"readme": "README.md",
|
|
39
|
+
"files": ["README.md", "bin", "lib", ".gen", "config", "cdktf.json", "ocdk.json"],
|
|
39
40
|
"publishConfig": { "access": "public" },
|
|
40
41
|
"dependencies": {
|
|
41
42
|
"cdktf": "^0.21.0",
|