@mikarinneoracle/oci-cdk-code-only-preview 0.0.7 → 0.0.8
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/bin/deploy-code-only.js
CHANGED
|
@@ -90,6 +90,8 @@ function createArchive() {
|
|
|
90
90
|
|
|
91
91
|
function jsonOci(args) {
|
|
92
92
|
const output = runOci([...args, '--output', 'json']).trim();
|
|
93
|
+
// Preview CLI can return an empty body for a successful list of no functions.
|
|
94
|
+
if (!output) return { data: [] };
|
|
93
95
|
const objectStart = output.indexOf('{');
|
|
94
96
|
const arrayStart = output.indexOf('[');
|
|
95
97
|
const start = objectStart !== -1 ? objectStart : arrayStart;
|
package/bin/destroy-code-only.js
CHANGED
|
@@ -25,6 +25,8 @@ function runOci(args) {
|
|
|
25
25
|
|
|
26
26
|
function jsonOci(args) {
|
|
27
27
|
const output = runOci([...args, '--output', 'json']).trim();
|
|
28
|
+
// Preview CLI can return an empty body for a successful list of no functions.
|
|
29
|
+
if (!output) return { data: [] };
|
|
28
30
|
const objectStart = output.indexOf('{');
|
|
29
31
|
const arrayStart = output.indexOf('[');
|
|
30
32
|
const start = objectStart !== -1 ? objectStart : arrayStart;
|