@pi-r/chrome 0.1.0 → 0.2.1

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/index.js CHANGED
@@ -764,7 +764,7 @@ function transformJs(host, file, output) {
764
764
  function replaceCss(file) {
765
765
  const sanitize = (map) => {
766
766
  for (const id in map) {
767
- map[id] = this.removeServerRoot(map[id]).replace(/^\//, '');
767
+ map[id] = this.removeServerRoot(map[id]);
768
768
  }
769
769
  };
770
770
  if (file.inlineUrlMap) {
@@ -1056,7 +1056,7 @@ class ChromeDocument extends Document {
1056
1056
  const serverRoot = ChromeDocument.INTERNAL_SERVERROOT;
1057
1057
  const srcDir = path.join(this.baseDirectory, serverRoot);
1058
1058
  if (isDir(srcDir)) {
1059
- const result = await Document.copyDir(srcDir, productionRelease, !this.archiving);
1059
+ const result = await Document.copyDir(srcDir, productionRelease, this.incremental !== 'staging');
1060
1060
  const failed = result.failed.map(value => this.removeCwd(value));
1061
1061
  for (const value of this.files) {
1062
1062
  if (value.startsWith(serverRoot)) {
@@ -2561,7 +2561,7 @@ class ChromeDocument extends Document {
2561
2561
  case 'export': {
2562
2562
  const ignoreCache = current.ignoreCache;
2563
2563
  const cacheKey = asString(current, true);
2564
- if (!current.ignoreCache && CACHE_DBRESULT.has(cacheKey)) {
2564
+ if (!ignoreCache && CACHE_DBRESULT.has(cacheKey)) {
2565
2565
  result[0] = getCacheItem(CACHE_DBRESULT, cacheKey);
2566
2566
  }
2567
2567
  else {
@@ -3397,7 +3397,7 @@ class ChromeDocument extends Document {
3397
3397
  const values = (0, util_1.splitEnclosing)(current, /\burl/gi);
3398
3398
  for (let i = 0, length = values.length; i < length; ++i) {
3399
3399
  const seg = values[i];
3400
- if (/^url\([^{}]*[{}]/i.test(seg)) {
3400
+ if (/^url\([^{}]*[{}][\S\s]*\)$/i.test(seg)) {
3401
3401
  replaceMap.push([values[i] = (0, types_1.generateUUID)(), seg]);
3402
3402
  }
3403
3403
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-r/chrome",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "description": "Chrome document constructor for E-mc.",
5
5
  "main": "index.js",
6
6
  "publishConfig": {
@@ -20,9 +20,9 @@
20
20
  "license": "MIT",
21
21
  "homepage": "https://github.com/anpham6/pi-r#readme",
22
22
  "dependencies": {
23
- "@e-mc/cloud": "^0.4.2",
24
- "@e-mc/core": "^0.4.2",
25
- "@e-mc/document": "^0.4.2",
26
- "@e-mc/types": "^0.4.2"
23
+ "@e-mc/cloud": "^0.5.2",
24
+ "@e-mc/core": "^0.5.2",
25
+ "@e-mc/document": "^0.5.2",
26
+ "@e-mc/types": "^0.5.2"
27
27
  }
28
28
  }
package/types/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { LocationUri, XmlTagNode } from '@e-mc/types/lib/squared';
2
2
 
3
- import type { DocumentConstructor, IDocument, IFileManager } from '@e-mc/types/lib';
3
+ import type { DocumentConstructor, ICloud, IDocument, IFileManager } from '@e-mc/types/lib';
4
4
  import type { DocumentAsset as IDocumentAsset } from '@e-mc/types/lib/document';
5
5
  import type { LogTime } from '@e-mc/types/lib/logger';
6
6
  import type { DbSourceDataType, DocumentComponentOption, DocumentComponent as IDocumentComponent, DocumentComponentOptions as IDocumentComponentOptions, DocumentDirectory as IDocumentDirectory, DocumentEval as IDocumentEval, DocumentModule as IDocumentModule, DocumentSettings as IDocumentSettings } from '@e-mc/types/lib/settings';
@@ -115,4 +115,4 @@ export interface ChromeDocumentConstructor<T extends IFileManager<U>, U extends
115
115
  INTERNAL_SERVERROOT: string;
116
116
  readonly prototype: IChromeDocument<T, U>;
117
117
  new(module?: DocumentModule, ...args: unknown[]): IChromeDocument<T, U>;
118
- }
118
+ }