@mikarinneoracle/oci-cdk-code-only-preview 0.0.18 → 0.0.20

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 CHANGED
@@ -124,6 +124,22 @@ export OCI_FUNCTION_HANDLER='func.handler'
124
124
  npx ocdk deploy --auto-approve --code-only
125
125
  ```
126
126
 
127
+ #### Find the available code-only runtimes
128
+
129
+ The exact `OCI_CODE_ONLY_RUNTIME_NAME` values are enabled per tenancy and region during this Limited Availability preview. Query the Preview CLI instead of copying a runtime name from another environment:
130
+
131
+ ```bash
132
+ # List every runtime available to the active OCI profile
133
+ "$OCI_CLI_PATH" fn runtime list --all --output table
134
+
135
+ # Narrow the list to one language, for example Python, Node.js, or Java
136
+ "$OCI_CLI_PATH" fn runtime list --all --language python --output table
137
+ "$OCI_CLI_PATH" fn runtime list --all --language node --output table
138
+ "$OCI_CLI_PATH" fn runtime list --all --language java --output table
139
+ ```
140
+
141
+ OCI Functions supports Java, Python, Node.js, Go, Ruby, and C# FDKs in general; code-only availability is limited to the runtimes returned by the command above. See Oracle's [supported language versions](https://docs.oracle.com/en-us/iaas/Content/Functions/Tasks/languagessupportedbyfunctions.htm).
142
+
127
143
  By default, the function name and Function App name both come from `func.yaml`'s `name`. Set these only to override that default or to use a differently named existing Function App:
128
144
 
129
145
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikarinneoracle/oci-cdk-code-only-preview",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "description": "OCI CDK stack for OCI Functions, API Gateway, and related infrastructure",
5
5
  "main": "lib/index.js",
6
6
  "bin": {
@@ -16,13 +16,15 @@ function debug(...args) {
16
16
  }
17
17
 
18
18
  // Defaults: in-code (injected by npx ocdk write-log-config when writing tail-function-logs.js) or env vars. Placeholders become empty.
19
+ const EXECUTION_LOG_ID_PLACEHOLDER = ['__EXECUTION', '_LOG_ID__'].join('');
20
+ const LOG_GROUP_ID_PLACEHOLDER = ['__LOG', '_GROUP_ID__'].join('');
19
21
  let DEFAULT_EXECUTION_LOG_ID = '__EXECUTION_LOG_ID__';
20
22
  let DEFAULT_LOG_GROUP_ID = '__LOG_GROUP_ID__';
21
23
  if (DEBUG) {
22
- debug('in-code defaults: execution_log=', DEFAULT_EXECUTION_LOG_ID === '__EXECUTION_LOG_ID__' ? 'placeholder' : 'set', 'log_group=', DEFAULT_LOG_GROUP_ID === '__LOG_GROUP_ID__' ? 'placeholder' : 'set');
24
+ debug('in-code defaults: execution_log=', DEFAULT_EXECUTION_LOG_ID === EXECUTION_LOG_ID_PLACEHOLDER ? 'placeholder' : 'set', 'log_group=', DEFAULT_LOG_GROUP_ID === LOG_GROUP_ID_PLACEHOLDER ? 'placeholder' : 'set');
23
25
  }
24
- if (DEFAULT_EXECUTION_LOG_ID === '__EXECUTION_LOG_ID__') DEFAULT_EXECUTION_LOG_ID = '';
25
- if (DEFAULT_LOG_GROUP_ID === '__LOG_GROUP_ID__') DEFAULT_LOG_GROUP_ID = '';
26
+ if (DEFAULT_EXECUTION_LOG_ID === EXECUTION_LOG_ID_PLACEHOLDER) DEFAULT_EXECUTION_LOG_ID = '';
27
+ if (DEFAULT_LOG_GROUP_ID === LOG_GROUP_ID_PLACEHOLDER) DEFAULT_LOG_GROUP_ID = '';
26
28
  if (DEBUG) {
27
29
  debug('final execution_log:', DEFAULT_EXECUTION_LOG_ID ? `${DEFAULT_EXECUTION_LOG_ID.slice(0, 30)}...` : '(empty)', 'log_group:', DEFAULT_LOG_GROUP_ID ? `${DEFAULT_LOG_GROUP_ID.slice(0, 30)}...` : '(empty)');
28
30
  }