@plasmicapp/cli 0.1.181 → 0.1.182

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.
@@ -23,9 +23,10 @@ const code_utils_1 = require("./code-utils");
23
23
  const config_utils_1 = require("./config-utils");
24
24
  const lang_utils_1 = require("./lang-utils");
25
25
  const user_utils_1 = require("./user-utils");
26
+ const findExtension = (filename) => { var _a; return (_a = filename === null || filename === void 0 ? void 0 : filename.substring(filename.indexOf("."))) !== null && _a !== void 0 ? _a : filename; };
26
27
  function stripExtension(filename, removeComposedPath = false) {
27
28
  const ext = removeComposedPath
28
- ? filename.substring(filename.indexOf("."))
29
+ ? findExtension(lodash_1.default.last(filename.split("/")))
29
30
  : upath_1.default.extname(filename);
30
31
  if (!ext || filename === ext) {
31
32
  return filename;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasmicapp/cli",
3
- "version": "0.1.181",
3
+ "version": "0.1.182",
4
4
  "description": "plasmic cli for syncing local code with Plasmic designs",
5
5
  "engines": {
6
6
  "node": ">=12"
@@ -15,9 +15,12 @@ import {
15
15
  import { ensureString } from "./lang-utils";
16
16
  import { confirmWithUser } from "./user-utils";
17
17
 
18
+ const findExtension = (filename?: string) =>
19
+ filename?.substring(filename.indexOf(".")) ?? filename;
20
+
18
21
  export function stripExtension(filename: string, removeComposedPath = false) {
19
22
  const ext = removeComposedPath
20
- ? filename.substring(filename.indexOf("."))
23
+ ? findExtension(L.last(filename.split("/")))
21
24
  : path.extname(filename);
22
25
  if (!ext || filename === ext) {
23
26
  return filename;