@teambit/bundler 1.0.547 → 1.0.548

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.
@@ -32,7 +32,7 @@ function devServerSchema(bundler) {
32
32
  // This is a bit of a hack to get the requested id. it assumes the variable name of
33
33
  // the gotHost.get query is "id".
34
34
  // see it in scopes/component/component/component.graphql.ts
35
- const requestedId = context.body.variables.id;
35
+ const requestedId = context?.body?.variables?.id;
36
36
  // if we ask for specific id with specific version it means we want to fetch if from scope
37
37
  // so don't return the server url
38
38
  // see https://github.com/teambit/bit/issues/5328
@@ -1 +1 @@
1
- {"version":3,"names":["_client","data","require","devServerSchema","bundler","typeDefs","gql","resolvers","Component","server","component","args","context","requestedId","body","variables","id","includes","componentServer","getComponentServer","env","envRuntime","url"],"sources":["dev-server.graphql.ts"],"sourcesContent":["import { Component } from '@teambit/component';\nimport { Schema } from '@teambit/graphql';\nimport { gql } from '@apollo/client';\n\nimport { BundlerMain } from './bundler.main.runtime';\n\n// TODO: this has to be refactored to the Preview aspect. with the entire preview logic here.\nexport function devServerSchema(bundler: BundlerMain): Schema {\n return {\n typeDefs: gql`\n extend type Component {\n server: ComponentServer\n }\n\n type ComponentServer {\n env: String\n url: String\n host: String\n basePath: String\n }\n `,\n resolvers: {\n Component: {\n server: (component: Component, args, context) => {\n // This is a bit of a hack to get the requested id. it assumes the variable name of\n // the gotHost.get query is \"id\".\n // see it in scopes/component/component/component.graphql.ts\n const requestedId = context.body.variables.id;\n // if we ask for specific id with specific version it means we want to fetch if from scope\n // so don't return the server url\n // see https://github.com/teambit/bit/issues/5328\n if (requestedId && requestedId.includes('@')) {\n return {};\n }\n const componentServer = bundler.getComponentServer(component);\n if (!componentServer) return {};\n\n return {\n env: componentServer.context.envRuntime.id,\n url: componentServer.url,\n };\n },\n },\n },\n };\n}\n"],"mappings":";;;;;;AAEA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA;AACO,SAASE,eAAeA,CAACC,OAAoB,EAAU;EAC5D,OAAO;IACLC,QAAQ,EAAE,IAAAC,aAAG;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;IACDC,SAAS,EAAE;MACTC,SAAS,EAAE;QACTC,MAAM,EAAEA,CAACC,SAAoB,EAAEC,IAAI,EAAEC,OAAO,KAAK;UAC/C;UACA;UACA;UACA,MAAMC,WAAW,GAAGD,OAAO,CAACE,IAAI,CAACC,SAAS,CAACC,EAAE;UAC7C;UACA;UACA;UACA,IAAIH,WAAW,IAAIA,WAAW,CAACI,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC5C,OAAO,CAAC,CAAC;UACX;UACA,MAAMC,eAAe,GAAGd,OAAO,CAACe,kBAAkB,CAACT,SAAS,CAAC;UAC7D,IAAI,CAACQ,eAAe,EAAE,OAAO,CAAC,CAAC;UAE/B,OAAO;YACLE,GAAG,EAAEF,eAAe,CAACN,OAAO,CAACS,UAAU,CAACL,EAAE;YAC1CM,GAAG,EAAEJ,eAAe,CAACI;UACvB,CAAC;QACH;MACF;IACF;EACF,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["_client","data","require","devServerSchema","bundler","typeDefs","gql","resolvers","Component","server","component","args","context","requestedId","body","variables","id","includes","componentServer","getComponentServer","env","envRuntime","url"],"sources":["dev-server.graphql.ts"],"sourcesContent":["import { Component } from '@teambit/component';\nimport { Schema } from '@teambit/graphql';\nimport { gql } from '@apollo/client';\n\nimport { BundlerMain } from './bundler.main.runtime';\n\n// TODO: this has to be refactored to the Preview aspect. with the entire preview logic here.\nexport function devServerSchema(bundler: BundlerMain): Schema {\n return {\n typeDefs: gql`\n extend type Component {\n server: ComponentServer\n }\n\n type ComponentServer {\n env: String\n url: String\n host: String\n basePath: String\n }\n `,\n resolvers: {\n Component: {\n server: (component: Component, args, context) => {\n // This is a bit of a hack to get the requested id. it assumes the variable name of\n // the gotHost.get query is \"id\".\n // see it in scopes/component/component/component.graphql.ts\n const requestedId = context?.body?.variables?.id;\n // if we ask for specific id with specific version it means we want to fetch if from scope\n // so don't return the server url\n // see https://github.com/teambit/bit/issues/5328\n if (requestedId && requestedId.includes('@')) {\n return {};\n }\n const componentServer = bundler.getComponentServer(component);\n if (!componentServer) return {};\n\n return {\n env: componentServer.context.envRuntime.id,\n url: componentServer.url,\n };\n },\n },\n },\n };\n}\n"],"mappings":";;;;;;AAEA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA;AACO,SAASE,eAAeA,CAACC,OAAoB,EAAU;EAC5D,OAAO;IACLC,QAAQ,EAAE,IAAAC,aAAG;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;IACDC,SAAS,EAAE;MACTC,SAAS,EAAE;QACTC,MAAM,EAAEA,CAACC,SAAoB,EAAEC,IAAI,EAAEC,OAAO,KAAK;UAC/C;UACA;UACA;UACA,MAAMC,WAAW,GAAGD,OAAO,EAAEE,IAAI,EAAEC,SAAS,EAAEC,EAAE;UAChD;UACA;UACA;UACA,IAAIH,WAAW,IAAIA,WAAW,CAACI,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC5C,OAAO,CAAC,CAAC;UACX;UACA,MAAMC,eAAe,GAAGd,OAAO,CAACe,kBAAkB,CAACT,SAAS,CAAC;UAC7D,IAAI,CAACQ,eAAe,EAAE,OAAO,CAAC,CAAC;UAE/B,OAAO;YACLE,GAAG,EAAEF,eAAe,CAACN,OAAO,CAACS,UAAU,CAACL,EAAE;YAC1CM,GAAG,EAAEJ,eAAe,CAACI;UACvB,CAAC;QACH;MACF;IACF;EACF,CAAC;AACH","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compilation_bundler@1.0.547/dist/bundler.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compilation_bundler@1.0.547/dist/bundler.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compilation_bundler@1.0.548/dist/bundler.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compilation_bundler@1.0.548/dist/bundler.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/bundler",
3
- "version": "1.0.547",
3
+ "version": "1.0.548",
4
4
  "homepage": "https://bit.cloud/teambit/compilation/bundler",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.compilation",
8
8
  "name": "bundler",
9
- "version": "1.0.547"
9
+ "version": "1.0.548"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -14,13 +14,13 @@
14
14
  "lodash": "4.17.21",
15
15
  "p-map-series": "2.1.0",
16
16
  "@teambit/harmony": "0.4.6",
17
- "@teambit/envs": "1.0.547",
18
- "@teambit/builder": "1.0.547",
19
- "@teambit/component": "1.0.547",
20
- "@teambit/cli": "0.0.1124",
21
- "@teambit/dependency-resolver": "1.0.547",
22
- "@teambit/graphql": "1.0.547",
23
- "@teambit/pubsub": "1.0.547",
17
+ "@teambit/envs": "1.0.548",
18
+ "@teambit/builder": "1.0.548",
19
+ "@teambit/component": "1.0.548",
20
+ "@teambit/cli": "0.0.1125",
21
+ "@teambit/dependency-resolver": "1.0.548",
22
+ "@teambit/graphql": "1.0.548",
23
+ "@teambit/pubsub": "1.0.548",
24
24
  "@teambit/legacy.bit-map": "0.0.91",
25
25
  "@teambit/toolbox.path.path": "0.0.8",
26
26
  "@teambit/toolbox.network.get-port": "1.0.10"