1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
| "use strict";
| var __importDefault = (this && this.__importDefault) || function (mod) {
| return (mod && mod.__esModule) ? mod : { "default": mod };
| };
| Object.defineProperty(exports, "__esModule", { value: true });
| exports.isMiniProgramAssetFile = void 0;
| const path_1 = __importDefault(require("path"));
| const EXTNAMES = [
| '.png',
| '.jpg',
| '.jpeg',
| '.gif',
| '.svg',
| '.json',
| '.cer',
| '.mp3',
| '.aac',
| '.m4a',
| '.mp4',
| '.wav',
| '.ogg',
| '.silk',
| '.wasm',
| '.br',
| '.cert',
| ];
| function isMiniProgramAssetFile(filename) {
| if (!path_1.default.isAbsolute(filename)) {
| return false;
| }
| return EXTNAMES.includes(path_1.default.extname(filename));
| }
| exports.isMiniProgramAssetFile = isMiniProgramAssetFile;
|
|