proscenium 0.3.0-arm64-darwin → 0.4.1-arm64-darwin

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: da2d8edab5c738829713ba0a7e133f87bdfc2e196678e81e13b659d1885a038b
4
- data.tar.gz: 73e62eff4f0d739216ef68fb2b4e55b7536bdd54f47996e1083a08d688ab9b99
3
+ metadata.gz: c49794ef4fa916c792416807d446491208f616aec182e09e85a894c4e42e9895
4
+ data.tar.gz: 717c3a149ff1aef9d0c7460caf7c0dc749d0809cbe1b5098ed6998ed92277429
5
5
  SHA512:
6
- metadata.gz: 2f2a27138e41d25203105361d256ae1bf1fba302a389e0880e78d70957c14b166314996ae59e3d62b56845e0c903d1d01e105834c0dbe20e3cc4c5a0d6632719
7
- data.tar.gz: 7d4a178f8b015049afb8bf1e71c0d41f945cc7a31d745c6a75c67e9ec88982e4ea3c146f6e2b9d8234beb6dd54479a23efdb124fbe4e5827d61b18ac3654b3e2
6
+ metadata.gz: 281bc9f08e4c454a7bcef642f77dadf309a600685e014b0162b2d69710a78a4fdec6c4b9bbbaeea5d2af83f7a9a5f60670d57ade312733fe1e5dbfd5781a966e
7
+ data.tar.gz: 576ed3414955a3d7a9036197e7a1bb3491aad35bfbdd1d4e4614216cf24022215a9a6da57e39d919159a18a7d1858a1ed0cdcee3b24491968b36290cb0b3954f
data/bin/esbuild CHANGED
Binary file
@@ -1,10 +1,13 @@
1
1
  import setup from './setup_plugin.js'
2
2
 
3
+ // Export environment variables as named exports only. You can also import from `env:ENV_VAR_NAME`,
4
+ // which will return the value of the environment variable as the default export. This allows you to
5
+ // safely import a variable regardless of its existence.
3
6
  export default setup('env', () => {
4
7
  return [
5
8
  {
6
9
  type: 'onResolve',
7
- filter: /^env$/,
10
+ filter: /^env(:.+)?$/,
8
11
  callback({ path }) {
9
12
  return { path, namespace: 'env' }
10
13
  }
@@ -14,9 +17,27 @@ export default setup('env', () => {
14
17
  type: 'onLoad',
15
18
  filter: /.*/,
16
19
  namespace: 'env',
17
- callback() {
20
+ callback({ path }) {
21
+ if (path.includes(':')) {
22
+ return {
23
+ loader: 'js',
24
+ contents: `export default '${Deno.env.get(path.split(':')[1])}'`
25
+ }
26
+ }
27
+
18
28
  const env = Deno.env.toObject()
19
- return { loader: 'json', contents: JSON.stringify(env) }
29
+ const contents = []
30
+
31
+ for (const key in env) {
32
+ if (Object.hasOwnProperty.call(env, key)) {
33
+ contents.push(`export const ${key} = '${env[key]}'`)
34
+ }
35
+ }
36
+
37
+ return {
38
+ loader: 'js',
39
+ contents: contents.join(';')
40
+ }
20
41
  }
21
42
  }
22
43
  ]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Proscenium
4
- VERSION = '0.3.0'
4
+ VERSION = '0.4.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proscenium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.1
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - Joel Moss
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-28 00:00:00.000000000 Z
11
+ date: 2022-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actioncable