@teambit/component 0.0.716 → 0.0.719
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/dist/component-fs.js
CHANGED
|
@@ -83,12 +83,20 @@ class ComponentFS extends _anyFs().MemoryFS {
|
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
byGlob(patterns) {
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
const excludePatterns = patterns.filter(pattern => pattern.startsWith('!'));
|
|
87
|
+
const includePatterns = patterns.filter(pattern => !pattern.startsWith('!'));
|
|
88
|
+
const files = this.files.filter(file => {
|
|
89
|
+
const included = includePatterns.some(pattern => {
|
|
88
90
|
const match = (0, _minimatch().default)(file.relative, pattern);
|
|
89
91
|
return match;
|
|
90
92
|
});
|
|
93
|
+
const excluded = excludePatterns.every(pattern => {
|
|
94
|
+
const match = (0, _minimatch().default)(file.relative, pattern);
|
|
95
|
+
return match;
|
|
96
|
+
});
|
|
97
|
+
return included && excluded;
|
|
91
98
|
});
|
|
99
|
+
return files;
|
|
92
100
|
}
|
|
93
101
|
|
|
94
102
|
toObject() {
|
package/dist/component-fs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["component-fs.ts"],"names":["ComponentFS","MemoryFS","constructor","files","hash","byRegex","extension","filter","file","path","match","byGlob","patterns","
|
|
1
|
+
{"version":3,"sources":["component-fs.ts"],"names":["ComponentFS","MemoryFS","constructor","files","hash","byRegex","extension","filter","file","path","match","byGlob","patterns","excludePatterns","pattern","startsWith","includePatterns","included","some","relative","excluded","every","toObject","map","contents","fromVinyls","fs","forEach","dirPath","relativeDir","join","mkdirpSync","writeFileSync"],"mappings":";;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AA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AAAA,QAAQ,GAAG;AACT,WAAO,KAAKnB,KAAL,CAAWoB,GAAX,CAAgBf,IAAD,IAAU;AAC9B,aAAO;AACLC,QAAAA,IAAI,EAAED,IAAI,CAACC,IADN;AAELe,QAAAA,QAAQ,EAAEhB,IAAI,CAACgB;AAFV,OAAP;AAID,KALM,CAAP;AAMD;;AAEgB,SAAVC,UAAU,CAACtB,KAAD,EAAyB;AACxC,UAAMuB,EAAE,GAAG,IAAI1B,WAAJ,CAAgBG,KAAhB,CAAX;AACAA,IAAAA,KAAK,CAACwB,OAAN,CAAenB,IAAD,IAAU;AACtB,UAAIoB,OAAO,GAAGpB,IAAI,CAACqB,WAAnB;AACA,UAAI,CAACD,OAAO,CAACb,UAAR,CAAmB,GAAnB,CAAL,EAA8Ba,OAAO,GAAGnB,gBAAKqB,IAAL,CAAU,GAAV,EAAeF,OAAf,CAAV;AAC9BF,MAAAA,EAAE,CAACK,UAAH,CAAcH,OAAd;AACAF,MAAAA,EAAE,CAACM,aAAH,CAAkB,IAAGxB,IAAI,CAACW,QAAS,EAAnC,EAAsC,iBAAKX,IAAI,CAACgB,QAAL,IAAiB,EAAtB,CAAtC;AACD,KALD;AAOA,WAAOE,EAAP;AACD;;AAjE+C","sourcesContent":["import { MemoryFS } from '@teambit/any-fs';\nimport type { AbstractVinyl } from '@teambit/legacy/dist/consumer/component/sources';\nimport { auto } from '@teambit/legacy/dist/utils/eol';\nimport path from 'path';\nimport minimatch from 'minimatch';\n\n/**\n * The virtual component filesystem\n */\nexport default class ComponentFS extends MemoryFS {\n constructor(\n /**\n * array of all fs files.\n */\n readonly files: AbstractVinyl[]\n ) {\n super();\n }\n /**\n * hash to represent all contents within this filesystem volume.\n */\n get hash() {\n return '';\n }\n\n /**\n * filter all component files by regex.\n */\n byRegex(extension: RegExp): AbstractVinyl[] {\n return this.files.filter((file) => file.path.match(extension));\n }\n\n /**\n * filter all files using an array of glob patterns.\n */\n byGlob(patterns: string[]) {\n const excludePatterns = patterns.filter((pattern) => pattern.startsWith('!'));\n const includePatterns = patterns.filter((pattern) => !pattern.startsWith('!'));\n\n const files = this.files.filter((file) => {\n const included = includePatterns.some((pattern) => {\n const match = minimatch(file.relative, pattern);\n return match;\n });\n const excluded = excludePatterns.every((pattern) => {\n const match = minimatch(file.relative, pattern);\n return match;\n });\n\n return included && excluded;\n });\n\n return files;\n }\n\n toObject() {\n return this.files.map((file) => {\n return {\n path: file.path,\n contents: file.contents,\n };\n });\n }\n\n static fromVinyls(files: AbstractVinyl[]) {\n const fs = new ComponentFS(files);\n files.forEach((file) => {\n let dirPath = file.relativeDir;\n if (!dirPath.startsWith('/')) dirPath = path.join('/', dirPath);\n fs.mkdirpSync(dirPath);\n fs.writeFileSync(`/${file.relative}`, auto(file.contents || ''));\n });\n\n return fs;\n }\n}\n"]}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/component",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.719",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/component/component",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.component",
|
|
8
8
|
"name": "component",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.719"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@teambit/any-fs": "0.0.5",
|
|
@@ -34,41 +34,41 @@
|
|
|
34
34
|
"@teambit/design.inputs.dropdown": "0.0.7",
|
|
35
35
|
"@teambit/component-id": "0.0.402",
|
|
36
36
|
"@teambit/ui-foundation.ui.menu-widget-icon": "0.0.488",
|
|
37
|
-
"@teambit/aspect-loader": "0.0.
|
|
37
|
+
"@teambit/aspect-loader": "0.0.719",
|
|
38
38
|
"@teambit/legacy-bit-id": "0.0.399",
|
|
39
39
|
"@teambit/toolbox.string.capitalize": "0.0.483",
|
|
40
|
-
"@teambit/cli": "0.0.
|
|
41
|
-
"@teambit/config": "0.0.
|
|
42
|
-
"@teambit/express": "0.0.
|
|
43
|
-
"@teambit/graphql": "0.0.
|
|
40
|
+
"@teambit/cli": "0.0.478",
|
|
41
|
+
"@teambit/config": "0.0.491",
|
|
42
|
+
"@teambit/express": "0.0.574",
|
|
43
|
+
"@teambit/graphql": "0.0.719",
|
|
44
44
|
"@teambit/bit-error": "0.0.394",
|
|
45
|
-
"@teambit/command-bar": "0.0.
|
|
45
|
+
"@teambit/command-bar": "0.0.719",
|
|
46
46
|
"@teambit/component.ui.deprecation-icon": "0.0.493",
|
|
47
|
-
"@teambit/preview": "0.0.
|
|
48
|
-
"@teambit/pubsub": "0.0.
|
|
49
|
-
"@teambit/react-router": "0.0.
|
|
47
|
+
"@teambit/preview": "0.0.719",
|
|
48
|
+
"@teambit/pubsub": "0.0.719",
|
|
49
|
+
"@teambit/react-router": "0.0.719",
|
|
50
50
|
"@teambit/ui-foundation.ui.is-browser": "0.0.486",
|
|
51
51
|
"@teambit/ui-foundation.ui.main-dropdown": "0.0.487",
|
|
52
52
|
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.489",
|
|
53
53
|
"@teambit/ui-foundation.ui.use-box.menu": "0.0.114",
|
|
54
|
-
"@teambit/ui": "0.0.
|
|
55
|
-
"@teambit/component-issues": "0.0.
|
|
54
|
+
"@teambit/ui": "0.0.719",
|
|
55
|
+
"@teambit/component-issues": "0.0.51",
|
|
56
56
|
"@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.487",
|
|
57
57
|
"@teambit/cli-table": "0.0.34",
|
|
58
|
-
"@teambit/component-descriptor": "0.0.
|
|
59
|
-
"@teambit/lanes.ui.lanes": "0.0.
|
|
58
|
+
"@teambit/component-descriptor": "0.0.41",
|
|
59
|
+
"@teambit/lanes.ui.lanes": "0.0.45",
|
|
60
60
|
"@teambit/ui-foundation.ui.react-router.use-query": "0.0.486",
|
|
61
61
|
"@teambit/design.ui.empty-box": "0.0.353",
|
|
62
62
|
"@teambit/harmony.ui.aspect-box": "0.0.486",
|
|
63
63
|
"@teambit/design.ui.pages.not-found": "0.0.354",
|
|
64
64
|
"@teambit/design.ui.pages.server-error": "0.0.354",
|
|
65
|
-
"@teambit/compositions": "0.0.
|
|
66
|
-
"@teambit/deprecation": "0.0.
|
|
67
|
-
"@teambit/envs": "0.0.
|
|
65
|
+
"@teambit/compositions": "0.0.719",
|
|
66
|
+
"@teambit/deprecation": "0.0.719",
|
|
67
|
+
"@teambit/envs": "0.0.719",
|
|
68
68
|
"@teambit/legacy-component-log": "0.0.392",
|
|
69
69
|
"@teambit/design.ui.styles.ellipsis": "0.0.347",
|
|
70
70
|
"@teambit/envs.ui.env-icon": "0.0.486",
|
|
71
|
-
"@teambit/component.ui.version-dropdown": "0.0.
|
|
71
|
+
"@teambit/component.ui.version-dropdown": "0.0.530",
|
|
72
72
|
"@teambit/ui-foundation.ui.full-loader": "0.0.486",
|
|
73
73
|
"@teambit/ui-foundation.ui.use-box.dropdown": "0.0.114",
|
|
74
74
|
"@teambit/ui-foundation.ui.constants.z-indexes": "0.0.487",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
94
|
"@apollo/client": "^3.0.0",
|
|
95
|
-
"@teambit/legacy": "1.0.
|
|
95
|
+
"@teambit/legacy": "1.0.258",
|
|
96
96
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
97
97
|
"react": "^16.8.0 || ^17.0.0"
|
|
98
98
|
},
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"react": "-"
|
|
121
121
|
},
|
|
122
122
|
"peerDependencies": {
|
|
123
|
-
"@teambit/legacy": "1.0.
|
|
123
|
+
"@teambit/legacy": "1.0.258",
|
|
124
124
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
125
125
|
"react": "^16.8.0 || ^17.0.0"
|
|
126
126
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const compositions = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@0.0.
|
|
2
|
-
export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@0.0.
|
|
1
|
+
export const compositions = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@0.0.719/dist/component.composition.js')]
|
|
2
|
+
export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@0.0.719/dist/component.docs.mdx')]
|
|
Binary file
|