Add missing new files from commit 131e09855e06
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / types / filesource.pp
diff --git a/3rdparty/modules/stdlib/types/filesource.pp b/3rdparty/modules/stdlib/types/filesource.pp
new file mode 100644 (file)
index 0000000..408dcb9
--- /dev/null
@@ -0,0 +1,9 @@
+# Validate the source parameter on file types
+type Stdlib::Filesource = Variant[
+  Stdlib::Absolutepath,
+  Stdlib::HTTPUrl,
+  Pattern[
+    /^file:\/\/\/([^\/\0]+(\/)?)+$/,
+    /^puppet:\/\/(([\w-]+\.?)+)?\/([^\/\0]+(\/)?)+$/,
+  ],
+]